Skip to main content

Retrieving balances via API

Information about the balance of all available accounts​

To retrieve information about the list of all accounts and their balances, you need to create a request using the GET method with the following set of parameters:

ParameterTypeRequiredDescription
POS_IDUUID✅Merchant's identifier (POS_ID)

Request example:

$ curl "https://api.aifintech.ua/api/v1/balances/pos/${POS_ID}/accounts" \
-H "X-API-AUTH: CPAY ${API_KEY}:${API_SECRET}"

Example of body request:

{
"accounts": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"currency": "UAH",
"balances": {
"available": 0,
"rollingReserve": 0
}
}
]
}

Information about the balance of a specific account​

To retrieve information about the balance of a specific account, you need to create a request using the GET method with the following set of parameters:

ParameterTypeRequiredDescription
POS_IDUUID✅Merchant's identifier (POS_ID)
ACCOUNT_IDUUID✅Account identifier

Example request for retrieving account balance information:

$ curl "https://api.aifintech.ua/api/v1/balances/pos/${POS_ID}/accounts/${ACCOUNT_ID}" \
-H "X-API-AUTH: CPAY ${API_KEY}:${API_SECRET}"

Example response body:

{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"currency": "UAH",
"balances": {
"available": 0,
"rolling_reserve": 0
}
}
info

Information about the account identifier (account_id) can be found in the merchant portal under the "Balances" section.

Possible response codes​

CodeDescription
200OK. All merchants' accounts with balances
400Invalid data provided
401Invalid credentials
500Unexpected error