Retrieving account balances

This request is used to aggregate and retrieve information about the available balance sheets of the accounts of the merchant.

The system generates and transmits OUT type balances for the connected projects split by contracts, payment methods, and currencies. The list of projects is determined by the token and token key transmitted in the request.

The availability rate of data received by using Data API can have a delay of up to 5 minutes.

Creating a request for retrieving account balances

POST the request to /balance/get.

In the request, you pass the token and token key that were generated in Old Dashboard. For more information about generating the token and the token key, see Generating token and token key for Data API.

Figure: Example of the account balances request

{
  "token":"ZOyTL5shY8ddhpxdQyplRPJYmGV7Kv",
  "signature":"dQcIbv94Z0nPTYX9s29PHlVRMnCanglSCiVkPmxn11PRPsiNLCGT5g+HClmNrPe9l9QPjqInXqYrY9bzkfcBGQ=="
}

In response, you get account balances for projects whose list is determined by the transmitted token and token key. For each balance, the response contains the currency and the numerical value of the balance in the minor units of this currency.

Figure: Example of the account balances response

{
    "balance": [
        {
            "contract_name": "DAS Contract",
            "name": "DAS Balance GBP",
            "RUB": "10100126895703"
        },
        {
            "contract_name": "DAS Contract",
            "name": "DAS Balance USD",
            "SGD": "3199"
        },
        {
            "contract_name": "DAS Contract EUR",
            "name": "DAS Balance EUR",
            "EUR": "1131284819"
        }
    ],
    "signature": "3XOq69q0FamTY1Y0ej5/x4Sq2Uw+qAIdV4N6E6dnTCxFJLFdZbCj4iOKvPLwQQrRtwxFy5gTz1ggQkoMK9tw5w=="
}