Appearance
GET Get Balance
Using the Endpoint
https://api.magmaonepay.com/v1/misc/balance
Headers
Header | Value |
---|---|
Authorization | Bearer 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:
Field | Description | Type |
---|---|---|
name | Name of the country | String |
prefix | Telephone prefix of the country | String |
code | Country code | String |
currency | Currency code | String |
balance | Total balance in the country's currency | Number |
balance_available | Available balance in the country's currency | Number |
last_updated_at | Timestamp of the last update | String |
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.