The accounts balances are available at any time using the HUB2 API.

Please check the endpoint in the API reference.

Request

Here is a sample of a request to that endpoint :

curl --location --request GET 'https://api.hub2.io/balance?currency=XOF&date=2023-10-01T00:00:00.000Z' \
--header 'ApiKey: [REDACTED]' \
--header 'MerchantId: [REDACTED]' \
--header 'Environment: sandbox' \

Please note the following parameters :

  • Parameter currency : identify the currency to fetch, here the value is XOF
  • Parameter date : identify the date for which the balance will be fetched, here the value is 2023-10-01T00:00:00.000Z, default value is now if the field is missing

Response

Here is a sample of the response in JSON format :

{
  "collectionAccount": [
    {
      "amount": 100,
      "availableBalance": 100,
      "currency": "XOF",
      "date": "2023-10-01T00:00:00.000Z"
    }
  ],
  "transferAccount": [
    {
      "availableBalance": 100,
      "reservedBalance": 100,
      "currency": "XOF",
      "date": "2023-10-01T00:00:00.000Z",
      "amount": 100
    }
  ]
}