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.finline.io/api/v1/balances/pos/${POS_ID}/accounts" \
-H "X-API-AUTH: CPAY-HMAC-SHA256 ${API_KEY}:${SIGNATURE}"

Example of response body:

{
"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

Request example:

$ curl "https://api.finline.io/api/v1/balances/pos/${POS_ID}/accounts/${ACCOUNT_ID}" \
-H "X-API-AUTH: CPAY-HMAC-SHA256 ${API_KEY}:${SIGNATURE}"

Example of 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.

Information about the balance of all available terminals​

To retrieve information about the list of all terminals 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.finline.io/api/v1/balances/pos/${POS_ID}/terminals" \
-H "X-API-AUTH: CPAY-HMAC-SHA256 ${API_KEY}:${SIGNATURE}"

Example of response body:

{
"terminals": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"currency": "UAH",
"balances": {
"available": 100
}
},
{
"id": "5fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"currency": "UAH",
"balances": {
"available": 50
}
}
]
}

Error handling​

You will receive response in following format in case there are those terminals among all available ones that do not return the balance:


{
"terminals": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"currency": "UAH",
"balances": {
"available": 100
}
}
],
"failed_terminals": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"message": "The terminal balance is temporarily unavailable"
},
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa7",
"message": "The terminal balance is temporarily unavailable"
}
]
}

Information about the balance of a specific terminal​

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

ParameterTypeRequiredDescription
POS_IDUUID✅Merchant's identifier (POS_ID)
TERMINAL_IDUUID✅Account identifier.

Request example:

$ curl "https://api.finline.io/api/v1/balances/pos/${POS_ID}/terminals/${TERMINAL_ID}" \
-H "X-API-AUTH: CPAY-HMAC-SHA256 ${API_KEY}:${SIGNATURE}"

Example of response body:

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

Please contact our support team to receive the terminal identifier (terminal_id).

Possible response codes​

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