Get your balances
The balance API provides the possibility of getting your balance in all countries by Mobile Money operator. It can be used directly to control when to make payments.
How to get your balances
To retrieve your balances from chipdeals, you will need to issue a GET
request to the balance retrieval url. No additional information is required other than your apikey
Request Url
https://apis.chipdeals.me/momo/requestpayment?apikey=<YOUR_API_KEY>
- HTTP
- Curl
- NodeJs
- Laravel
- PHP
GET https://apis.chipdeals.me/momo/balance?apikey=test_FOdigzgSopV8GZggZa89 HTTP/1.1
curl --request GET 'https://apis.chipdeals.me/momo/balance?apikey=test_FOdigzgSopV8GZggZa89'
const momo = require("@chipdeals/momo-api");momo.setApiKey("test_FOdigzgSopV8GZggZa89");momo.status(reference).then((transactionData) => console.log(transactionData));
$momo = new \Chipdeals\MomoApi\Momo();$momo->setApiKey("test_FOdigzgSopV8GZggZa89");$balances = $momo->getBalances();foreach ($balances as $balanceKey => $balance) { print_r($balance->getArray());}
require_once("path/to/chipdeals-mobile-money-api.php");$momo = new Momo();$momo->setApiKey("test_FOdigzgSopV8GZggZa89");$balances = $momo->getBalances();foreach ($balances as $balanceKey => $balance) { print_r($balance->getArray());}
Answer
When you launch a balance recovery request, you get a response with the following specifics
{
"success": true,
"message": "",
"balances": [
{
"countryCode": "BJ",
"currency": "XOF",
"operator": "MTN",
"amount": 9000
},
{
"countryCode": "CI",
"currency": "XOF",
"operator": "MOOV",
"amount": 400
}
//...
]
}