Skip to main content
POST
/
v1
/
ais
/
accounts
/
balance
Get Account Balance
curl --request POST \
  --url https://acount-apis-staging-a8cdb2402163.herokuapp.com/v1/ais/accounts/balance \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "userId": "user_35100188",
  "merchantId": 1,
  "accountId": "a:C1hTinv2QaUbNMeTmTqjoXakVgiodpzmwtRKWqsGTbaR:ZhBVAJSGzmfoR"
}
'
{
  "userId": "user_2abc123def456",
  "merchantId": 1,
  "accountId": "a:6CpoqfjmyhfT9QAbcTZ2gcnb8egGfKLKMpxzuZPoaMLB:BzQQ5nvcb7TM4Qts",
  "balance": {
    "value": "1000.50",
    "currency": "DKK",
    "lastUpdated": "2024-01-01T12:00:00Z"
  },
  "accountDetails": {
    "iban": "DK5000400440116243",
    "accountHolderName": "John Doe",
    "bankId": "bank_123"
  }
}
Retrieves balance using Token.io’s /accounts/{accountId}/balance endpoint.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-request-id
string

Request ID for tracking

Body

application/json
userId
string
required
Example:

"user_35100188"

merchantId
integer
required
Example:

1

accountId
string
required
Example:

"a:C1hTinv2QaUbNMeTmTqjoXakVgiodpzmwtRKWqsGTbaR:ZhBVAJSGzmfoR"

Response

Balance retrieved successfully

userId
string
Example:

"user_2abc123def456"

merchantId
integer
Example:

1

accountId
string
Example:

"a:6CpoqfjmyhfT9QAbcTZ2gcnb8egGfKLKMpxzuZPoaMLB:BzQQ5nvcb7TM4Qts"

balance
object
accountDetails
object