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:
Parameter | Type | Required | Description |
---|---|---|---|
POS_ID | UUID | ✅ | Merchant's identifier (POS_ID ) |
Request example:
$ curl
"https://api.tranzzo.com/api/v1/pos/${POS_ID}/accounts" \
-H "X-API-AUTH: CPAY ${API_KEY}:${API_SECRET}" \
-H "X-API-KEY: ${ENDPOINTS_KEY}"
Example of body request:
{
"accounts": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"currency": "UAH",
"balances": {
"available": 0,
"rolling_reserve": 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:
Parameter | Type | Required | Description |
---|---|---|---|
POS_ID | UUID | ✅ | Merchant's identifier (POS_ID ) |
ACCOUNT_ID | UUID | ✅ | Account identifier |
Example request for retrieving account balance information:
$ curl "https://api.tranzzo.com/api/v1/pos/${POS_ID}/accounts/${ACCOUNT_ID}" \
-H "X-API-AUTH: CPAY ${API_KEY}:${API_SECRET}" \
-H "X-API-KEY: ${ENDPOINTS_KEY}"
Example response body:
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"currency": "UAH",
"balances": {
"available": 0,
"rollingReserve": 0
}
}
info
Information about the account identifier (account_id
) can be found in the merchant portal under the "Balances" section.
Possible response codes
Code | Description |
---|---|
200 | OK. All merchants' accounts with balances |
400 | Invalid data provided |
401 | Invalid credentials |
500 | Unexpected error |