Skip to content

Balance

A balance request can be used to inquire on the balance amount of the account.


Request

Info

Balance request API depends on an acquiring bank. Some banks require parameter account, some banks require currency. Please contact your account manager to clarify the request parameters.

To get the balance, send a POST request to https://gateway.pay-cross.com/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 PayCross 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 PayCross 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
         }
      }
   }
}