The Balances product returns the cached or realtime balances for a customer’s financial account. Use it to determine if an account has sufficient funds before using it as a funding source for a transaction.
API Reference
- Search financial accounts:
GET /bank-linking/accounts
- Get a specific financial account:
GET /bank-linking/accounts/{accountId}
- Refresh customer accounts:
POST /bank-linking/connections/{connectionId}/refresh
Overview
There are two types of balance data: current balance and available balance.
- Current balance — The total amount of money in the account. This does not mean it is all available to spend. Some funds may be from deposits or checks that have not cleared yet.
- Available balance — The total amount of money in the account that is available for your customer to spend.
For fraud detection and insufficient-funds (NSF) prevention use cases, use available balance to determine fund sufficiency — it represents the predicted balance net of any pending transactions. Current balance does not take pending transactions into account.
In some cases, a financial institution may not return available balance information. If that happens, you can calculate it by starting with the current balance, then using the transactions endpoint to detect pending transactions and adjusting the balance accordingly.
Balance data
When calling the financial accounts endpoint, you can access the currency, currentAmount, and availableAmount for that account. See Retrieving Connection Data for an example.
Sample response
{
"id": "W9ja25UmrZF25xbG22wdd",
"accountId": "W9kbkRme9VT2iz6qdsaww2",
"customerId": "W9ja24edcTHBks8h2e2dww",
"institutionId": "Ntj3AwgdridJc2rasdssdd",
"institutionName": "Chase",
"status": "ACTIVE",
"type": "DEPOSITORY",
"subtype": "CHECKING",
"name": "Checking",
"truncatedAccountNumber": "1234",
"identifiers": {
// data
},
"balances": {
"currency": "USD",
"currentAmount": 3578.41,
"availableAmount": 3578.41,
"updatedAt": "2022-03-08T23:19:23Z"
},
"owners": [
// data
],
"serviceProviderDetails": [
// data
]
}
Account balance updates
Account balance data is constantly updated as new transactions are made and previous transactions are processed. Use Meld’s webhooks to receive updates on the data — see Webhooks Quickstart for setup details.