Skip to content

GET Get Balance

Using the Endpoint

https://api.magmaonepay.com/v1/misc/balance

Headers

HeaderValue
AuthorizationBearer TOKEN

NB: TOKEN is your private secret key dependant on your mode (live or test) for server-side

Usage

This endpoint retrieves the balance information for various countries. It provides details such as the name of the country, currency code, and balance details.

Response Fields

The response is a JSON array, with each object in the array representing balance information for a different country.

Array Object Fields

Each object in the response array contains the following fields:

FieldDescriptionType
nameName of the countryString
prefixTelephone prefix of the countryString
codeCountry codeString
currencyCurrency codeString
balanceTotal balance in the country's currencyNumber
balance_availableAvailable balance in the country's currencyNumber
last_updated_atTimestamp of the last updateString

Example Response

json
{
    "code": 200,
    "message": "OK",
    "data": [
        {
            "name": "Benin",
            "prefix": "+229",
            "code": "BJ",
            "currency": "XOF",
            "balance": 0,
            "balance_available": 0,
            "last_updated_at": "2024-06-04 00:43:26"
        },
        {
            "name": "Mali",
            "prefix": "+223",
            "code": "ML",
            "currency": "XOF",
            "balance": 0,
            "balance_available": 0,
            "last_updated_at": "2024-06-04 00:43:26"
        },
        {
            "name": "Côte d'Ivoire",
            "prefix": "+225",
            "code": "CI",
            "currency": "XOF",
            "balance": 0,
            "balance_available": 0,
            "last_updated_at": "2024-06-04 00:43:26"
        },
        {
            "name": "Guinea (Conakry)",
            "prefix": "+224",
            "code": "GN",
            "currency": "GNF",
            "balance": 0,
            "balance_available": 0,
            "last_updated_at": "2024-06-04 00:43:26"
        },
        {
            "name": "Ghana",
            "prefix": "+233",
            "code": "GH",
            "currency": "GHS",
            "balance": 0,
            "balance_available": 0,
            "last_updated_at": "2024-06-04 00:43:26"
        },
        {
            "name": "Senegal",
            "prefix": "+221",
            "code": "SN",
            "currency": "XOF",
            "balance": 0,
            "balance_available": 0,
            "last_updated_at": "2024-06-04 00:43:26"
        },
        {
            "name": "Burkina Faso",
            "prefix": "+226",
            "code": "BF",
            "currency": "XOF",
            "balance": 0,
            "balance_available": 0,
            "last_updated_at": "2024-06-04 00:43:26"
        },
        {
            "name": "Cameroon",
            "prefix": "+237",
            "code": "CM",
            "currency": "XAF",
            "balance": 0,
            "balance_available": 0,
            "last_updated_at": "2024-06-04 00:43:26"
        },
        {
            "name": "Togo",
            "prefix": "+228",
            "code": "TG",
            "currency": "XOF",
            "balance": 0,
            "balance_available": 0,
            "last_updated_at": "2024-06-04 00:43:26"
        },
        // More balance
    ]
}

This structure provides a comprehensive overview of the "Get Balance" endpoint, detailing how to use it, the expected response, and an example of the response data.