Skip to content

Balance

The balance request returns the MID balance value in the system of your acquiring bank (or provider).

Info

This request doesn't return your balance in the Horizonpay system.


Request

Info

The ability to execute the balance request and the request parameters depend on the acquiring bank. Some banks require parameter account, some banks require currency. Please contact your account manager to confirm if the request can be executed and to clarify which parameters are required.

To get the balance, send a POST request to https://gw.horizonpay.kz/balance with the X-API-Version: 2 header and the following parameters:

Parameter Type Description
account * conditionally required
string Account number. If empty, the system returns the balance of the default account.
currency * conditionally required
string Currency in ISO-4217 format, for example USD.
gateway_id * conditionally required
string Gateway ID in the Horizonpay system.
Example of the balance request by account number
{
   "request":{
      "account":"40701810842020395221"
   }
}
Request example if balance is requested by currency
{
   "request":{
      "currency":"USD"
   }
}
Example of the request if the balance is requested by the gateway ID
{
   "request":{
      "gateway_id":"1"
   }
}
Response
Parameter Type Description
status * required
string Status of response.
result * required
string Balance result.
gatewayId * required
integer Gateway ID in the Horizonpay system.
account string Account number.
amount integer Account balance in minimal currency units.
currency string Currency. Provided if the bank returns it, or if the bank processes transactions in one currency only.
bankInfo object A section of additional information as provided by the bank.
Example of the response
{
   "status": "successful",
   "result": {
      "gatewayId": 5,
      "account": "40701810820020300021",
      "amount": 6623871674,
      "currency": "RUB",
      "bankInfo": {
         "Account": "40701810820020300021",
         "Amount": 66238716.74,
         "Balance": {
         "OperDate": "2021-12-15T00:00:00",
         "Credit": 0.0,
         "CreditRub": 0.0,
         "Debit": 0.0,
         "DebitRub": 0.0,
         "AmountIn": 132339134.78,
         "AmountInRub": 132339134.78,
         "AmountOut": 132339134.78,
         "AmountOutRub": 132339134.78
         }
      }
   }
}