Balances: deposit and transfer balances
Before you send money or request a settlement, check that the right balance is high enough. Each operation debits or credits a specific balance, described below.
Two families of balances
Section titled “Two families of balances”Senfenico keeps two separate families of balances.
| Family | What it holds | What it pays for |
|---|---|---|
Deposit balances (deposit_balances) |
Money collected from your customers (successful charges), Senfenico fees deducted | Settlements, refunds and top-ups of your transfer balances |
Transfer balances (transfer_balances) |
A prepaid balance per operator (Orange Money BF, Moov BF, Sank BF, Moov Benin, MTN Benin) | Transfers to that operator only |
Deposit balances are grouped by region. bf combines Orange, Moov, Sank and Coris payments in Burkina Faso, while moov_bj and mtn_bj stay separate.
Retrieve your balances
Section titled “Retrieve your balances”/v1/payment/balances/curl https://api.senfenico.com/v1/payment/balances/ \ -H "X-API-KEY: sk_test_..."$client = new \GuzzleHttp\Client([ 'base_uri' => 'https://api.senfenico.com/v1/payment/', 'headers' => ['X-API-KEY' => getenv('SENFENICO_KEY')], 'http_errors' => false,]);
$res = $client->get('balances/');$body = json_decode($res->getBody(), true);$orange = $body['data']['transfer_balances']['orange_money_bf'];echo $orange['available'];import osimport requests
res = requests.get( "https://api.senfenico.com/v1/payment/balances/", headers={"X-API-KEY": os.environ["SENFENICO_KEY"]}, timeout=30,)body = res.json()orange = body["data"]["transfer_balances"]["orange_money_bf"]print(orange["available"])const res = await fetch( 'https://api.senfenico.com/v1/payment/balances/', { headers: { 'X-API-KEY': process.env.SENFENICO_KEY } },);const body = await res.json();const orange = body.data.transfer_balances.orange_money_bf;console.log(orange.available);Response (200):
{ "status": true, "message": "Balance retrieved", "data": { "deposit_balances": { "bf": { "available": 48500.0, "pending": 5000, "currency": "XOF" }, "moov_bj": { "available": 0.0, "pending": 0.0, "currency": "XOF" }, "mtn_bj": { "available": 0.0, "pending": 0.0, "currency": "XOF" } }, "transfer_balances": { "orange_money_bf": { "available": 94925.0, "pending": 5000, "currency": "XOF" }, "moov_bf": { "available": 20000.0, "pending": 0, "currency": "XOF" }, "sank_money_bf": { "available": 0.0, "pending": 0, "currency": "XOF" }, "moov_bj": { "available": 0.0, "pending": 0, "currency": "XOF" }, "mtn_bj": { "available": 0.0, "pending": 0, "currency": "XOF" } } }}Test mode and live mode balances are separate. An sk_test_ key only sees test balances, an sk_live_ key only live balances.
Response fields
Section titled “Response fields”| Field | Type | Description |
|---|---|---|
available |
number | Amount you can use now, in XOF. Amounts already committed (settlements, refunds, transfers in progress) are already deducted. |
pending |
number | Amount committed but not yet gone. For deposits, this covers processing/in_transit settlements, pending refunds and pending top-ups. For transfer balances, pending/in_transit transfers. |
currency |
string | Always XOF. |
Transfer balance keys
Section titled “Transfer balance keys”The keys of transfer_balances are not all identical to the recipient_wallet values used to create a transfer:
Key in transfer_balances |
Matching recipient_wallet |
Country |
|---|---|---|
orange_money_bf |
orange_bf |
Burkina Faso |
moov_bf |
moov_bf |
Burkina Faso |
sank_money_bf |
sank_bf |
Burkina Faso |
moov_bj |
moov_bj |
Benin |
mtn_bj |
mtn_bj |
Benin |
How each operation moves your balances
Section titled “How each operation moves your balances”| Operation | Balance affected | available |
pending |
|---|---|---|---|
Charge success |
Deposits of the operator’s region | + amount − collection fee | — |
Refund created (pending) |
Deposits of the charge’s operator | − refunded amount | + amount |
Refund success |
Deposits | — | − amount |
Refund failed |
Deposits | + amount (returned) | − amount |
Settlement created (processing, then in_transit) |
Deposits of the chosen region | − amount | + amount |
Settlement success |
Deposits | — | − amount |
Settlement cancelled |
Deposits | + amount (returned) | − amount |
| Top-up from deposits, awaiting approval | Deposits | − amount | + amount |
| Top-up approved | Transfer balance of the chosen operator | + amount | — |
Transfer created (pending, then in_transit) |
Operator’s transfer balance | − amount − transfer fee | + amount |
Transfer success |
Transfer | — | − amount |
Transfer failed |
Transfer | + amount + fee (returned) | − amount |
Collection and transfer fees are percentages specific to your account. A transfer of amount costs amount × (1 + rate / 100) on the transfer balance. The rate applied is returned in the fees field of each transfer. To find out your rates, check your contract or write to contact@senfenico.com.
Worked example
Section titled “Worked example”With a hypothetical collection rate of 3%:
- A customer pays 10,000 XOF, and
deposit_balances.bf.availablegoes up by 9,700. - You refund it in full.
availabledrops by 10,000 as soon as the refund is created, andpendinggoes up by 10,000 until it is processed. - The net result is −300 XOF, because the collection fee of the original charge is not returned on a refund.
Topping up a transfer balance
Section titled “Topping up a transfer balance”Top-ups are done in the dashboard, under the Top Up menu, and are not available through the API. Choose the transfer balance to credit and the source of funds:
| Transfer balance | Accepted sources |
|---|---|
| Orange BF, Moov BF, Sank BF | Burkina deposit balance, bank transfer, check, deposit slip |
| Moov Benin | Moov Benin deposit balance, bank transfer, check, deposit slip |
| MTN Benin | MTN Benin deposit balance, bank transfer, check, deposit slip |
- A top-up by bank transfer, check or deposit slip is always approved manually by the Senfenico team.
- A top-up from a deposit balance is also approved by the team, unless automatic approval has been enabled for your account.
- The transfer balance is credited only once the top-up is approved. Approval time is not guaranteed. Plan ahead, for example by topping up the day before payroll.
- The
topup.pending,topup.successandtopup.failedwebhook events tell you how it is going.
Test mode balances
Section titled “Test mode balances”- With an
sk_test_key, your test charges feed the test deposit balance. - The test transfer balance is topped up the same way as in live, from the dashboard in test mode. If you cannot credit it, write to
contact@senfenico.com. - In test mode,
deposit_balances.bf.pendingcurrently returns the same value asavailable. Do not rely on this field in test.
Before you pay out
Section titled “Before you pay out”Read the balances again right before a bulk payout instead of relying on a cached value. For each operator, available must cover the sum of the amounts plus the fees of each transfer. Otherwise the transfer is refused with MERCHANT_INSUFFICIENT_FUNDS.