Get account balances for specific accounts
In this tutorial, you will learn how to use the Blockchain Deposit Account (BDA) Balances API to retrieve BDA balances based on the account identifers you provide. By the end of this tutorial, you will know how to:
- Create a well-formed balances request payload
- Interpret a successful response
Before you begin
To use the BDA Balances API, you will need:
- A registered and fully onboarded Developer Account on the J.P. Morgan Payments Developer Portal.
- An active project that provides you with the credentials used to make a request.
Send a request
Send a POST
request to the /accounts/balances/inquiry
endpoint. In the request body, you can specify which accounts and filter by balance types and date.
Current day
The following example shows a request for current day balances:
curl --request POST \
--url https://api-mock.payments.jpmorgan.com/account/v2/accounts/balances/inquiry \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR TOKEN' \
--header 'Content-Type: application/json' \
--header 'Request-Id: ' \
--data '{
"accountIdentifiers": [
{
"number": "1234567890",
"financialInstitutionId": {
"id": "CHASUS33MCY",
"idType": "BIC"
}
}
]
}'
Historical day
The following example shows a request for historic date balances.:
curl --request POST \
--url https://api-mock.payments.jpmorgan.com/account/v2/accounts/balances/inquiry \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR TOKEN' \
--header 'Content-Type: application/json' \
--header 'Request-Id: ' \
--data '{
"accountIdentifiers": [
{
"number": "1234567890",
"financialInstitutionId": {
"id": "CHASUS33MCY",
"idType": "BIC"
}
}
],
"fromDate": "2024-10-04",
"toDate": "2024-10-05"
}'
Confirm the response
You should receive a successful response payload containing a list of account balances.
Current day
The following example shows a response for current day balances:
{
"accountBalances": [
{
"account": {
"number": "1234567890",
"type": "BDA",
"currency": "USD",
"name": "Customer BDA Account",
"financialInstitutionIds": [
{
"id": "CHASUS33MCY",
"idType": "BIC"
}
]
},
"balances": [
{
"type": "INTERIM_AVAILABLE",
"amount": "5000.00",
"bookDate": "2024-10-06"
},
{
"type": "INTERIM_BOOKED",
"amount": "5000.00",
"bookDate": "2024-10-06"
}
]
}
],
"metadata": {
"cursor": {
"first": "9c0af3e7-0375-4343-a8bb-a2fc9ee51621",
"this": "9c0af3e7-0375-4343-a8bb-a2fc9ee51621",
"goodUntil": "2024-10-06T00:00:00.000Z"
}
}
}
Historical day
The following example shows a response for historical date balances:
{
"accountBalances": [
{
"account": {
"number": "1234567890",
"type": "BDA",
"currency": "USD",
"name": "Customer BDA Account",
"financialInstitutionIds": [
{
"id": "CHASUS33MCY",
"idType": "BIC"
}
]
},
"balances": [
{
"type": "CLOSING_AVAILABLE",
"amount": "5000.00",
"bookDate": "2024-10-05"
},
{
"type": "CLOSING_BOOKED",
"amount": "5000.00",
"bookDate": "2024-10-05"
},
{
"type": "CLOSING_AVAILABLE",
"amount": "5000.00",
"bookDate": "2024-10-04"
},
{
"type": "CLOSING_BOOKED",
"amount": "5000.00",
"bookDate": "2024-10-04"
}
]
}
],
"metadata": {
"cursor": {
"first": "9c0af3e7-0375-4343-a8bb-a2fc9ee51621",
"this": "9c0af3e7-0375-4343-a8bb-a2fc9ee51621",
"goodUntil": "2024-10-05T00:00:00.000Z"
}
}
}
Next Steps
Learn how to get account balances for all eligibile accounts.