Accept payments
Mobile money collections
Collect from MTN and Airtel wallets in Rwanda and Uganda with one request.
Create a charge with a payer, and we send a mobile money prompt to the
payer's phone. When they approve it, the money is yours.
Rather not build the payment form? Checkout sends your customer to a hosted page that asks for the number and network for you.
Key requirements
- A key with
payments:write. Ask_test_key while you build. - Your business holds the currency: RWF for a payer in Rwanda, UGX for a payer in Uganda. A collection settles into that balance.
- The payer's phone number and network:
MTNorAirtel.
| Rwanda | |
|---|---|
| Currency | RWF (country_code RW) |
| Phone format | 250788123456. Also accepted: 0788123456, +250788123456. |
| Networks | MTN or Airtel |
| Collect | MTN and Airtel mobile money |
| Pay out | MTN and Airtel mobile money, Bank account. A bank payout needs a bank_code from GET /payout-banks?country_code=RW. |
| Amounts | Whole francs: amount_minor a multiple of 100. 5,000 RWF is 500000. |
| Test numbers | Yes, for payouts: +250788000001 to +250788000005 force an outcome. |
How it works
- You create a charge with the payer's number and network.
- We send a prompt to the payer's phone, and they approve it.
- You receive
charge.succeeded, and the money is in your balance.
Nothing is taken until the payer approves.
Step 1 — Create the charge
curl -X POST https://api.inversepay.app/api/b/v1/charges \
-H "Authorization: Bearer $INVERSEPAY_TEST_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"idempotency_key": "order-rw-1042",
"amount_minor": 500000,
"currency": "RWF",
"channel": "mobile_money",
"reference": "ORDER-1042",
"payer": {
"phone_number": "250788123456",
"network": "MTN",
"country_code": "RW"
}
}'{
"id": "3f1c9a2e-...",
"reference": "ORDER-1042",
"amount_minor": 500000,
"currency": "RWF",
"status": "created",
"channel": "mobile_money",
"failure_reason": null,
"is_test": false
}| Field | ||
|---|---|---|
idempotency_key | required | 8–128 characters. Yours. Send it again and you get the original charge back. |
amount_minor | required | Whole francs: a multiple of 100. 5,000 RWF is 500000. |
currency | required | RWF. |
reference, channel | optional | Your own reference, and mobile_money. |
payer.phone_number | required | 250788123456. 0788123456 and +250788123456 are accepted too. |
payer.network | required | MTN or Airtel. |
payer.country_code | required | RW. |
Leave payer out and nobody is prompted. A live charge without a payer is
created and never sent to a phone.
Collect into a sub-account by adding "account": "acct_…". Leave it out and
the money settles into your main account. See Sub-accounts.
Step 2 — Tell the payer to approve the prompt
Shortly after you create the charge, the payer's phone shows a mobile money prompt for the amount. They approve it, decline it, or ignore it. The prompt comes from their network, not from us, so tell your customer to expect it and keep the phone to hand. Show "check your phone" from the moment you create the charge.
The prompt waits 60 minutes. After that the charge fails with timeout.
Step 3 — Confirm it
Wait for charge.succeeded on your webhook endpoint, or read
the charge:
curl https://api.inversepay.app/api/b/v1/charges/$CHARGE_ID \
-H "Authorization: Bearer $INVERSEPAY_TEST_KEY"Only succeeded means money. Fulfil the order then, and not before.
Statuses
| Status | What it means |
|---|---|
created | Accepted. Not yet sent to the payer's phone. Sending happens shortly after the response, not inside it. |
pending | The prompt is on the payer's phone. Nobody has paid yet. |
succeeded | The payer approved. net_minor is credited to your balance straight away. |
failed | The payer declined, did not answer, or the network refused it. |
pending is not paid. It means the prompt went out, nothing more.
A live charge returns created, and about a minute later moves to pending
while the prompt is on the payer's phone.
A timeout is not final. A payer who approves within 24 hours of the
prompt has paid, and the charge moves from failed to succeeded. Treat a
timeout failure as reversible: do not cancel the order the moment it arrives.
Webhooks
Register an endpoint and you receive:
| Event | When |
|---|---|
charge.created | The charge exists. |
charge.succeeded | The payer paid. The payload carries fee_minor, net_minor and reconciled_late. |
charge.failed | It did not happen. The payload's reason says why, as far as the network told us. |
There is no event for pending. Poll GET /charges/{id} if you need it.
Each event type fires at most once per charge. A late success therefore
arrives as charge.failed followed by charge.succeeded, with
reconciled_late: true. Let the later one win.
Every charge.* delivery carries the charge as data, the same object
GET /charges/{id} returns, plus your metadata and the payer's number:
{
"id": "8f14e45f-ceea-467a-9c4b-1f0bd4f1a2c3",
"type": "charge.succeeded",
"created_at": "2026-11-24T09:13:20Z",
"data": {
"id": "3f1c9a2e-...",
"reference": "ORDER-1042",
"amount_minor": 5000000,
"fee_minor": 100000,
"net_minor": 4900000,
"currency": "UGX",
"status": "succeeded",
"channel": "mobile_money",
"failure_reason": null,
"is_test": false,
"confirmed_at": "2026-11-24T09:13:19Z",
"metadata": { "order_id": "1042" },
"payer": { "phone_number": "256772123456", "network": "MTN", "country_code": "UG" }
},
"event": {
"id": "c2b0...",
"created_at": "2026-11-24T09:13:19Z",
"payload": {
"charge_id": "3f1c9a2e-...",
"reference": "ORDER-1042",
"status": "succeeded",
"amount_minor": 5000000,
"fee_minor": 100000,
"net_minor": 4900000,
"currency": "UGX",
"reconciled_late": false
}
}
}data.status is the charge now; event.payload.status is what it was when
the event happened. They differ when a delivery is retried after the charge has
moved on.
Errors
Refused when you create it
Nothing is created and nobody is prompted.
| Status | code | What happened |
|---|---|---|
400 | INVALID_CHARGE | A non-positive amount, or a payer whose country_code contradicts their number. |
403 | INSUFFICIENT_AUTHORITY | The key lacks payments:write. |
404 | ACCOUNT_NOT_FOUND | account names no account of yours in this key's mode. |
409 | ACCOUNT_NOT_ACTIVE | account is closed. A frozen account still receives. |
422 | CURRENCY_NOT_ACTIVATED | account does not hold the charge's currency. |
422 | VALIDATION_FAILED | A field is missing or malformed, including any fee_minor other than 0. The body names the field. |
| Status | code | What happened |
|---|---|---|
400 | INVALID_CHARGE | The payer's number is not a Rwandan mobile-money number, the network is not MTN or Airtel, or amount_minor is not whole francs (a multiple of 100). The message says which. Live and test alike. |
Accepted, then never sent
Some rules are checked only when the charge is about to go to the phone. A charge that breaks one is not sent to the payer, so nobody is prompted. Check these yourself before you create the charge:
Nothing reaches this stage in Rwanda: the number, the network and whole francs
are all checked when you create the charge, and a charge that breaks one is
refused with 400 INVALID_CHARGE (see Refused when you create
it).
Failed after the prompt
failure_reason on the charge, and reason on charge.failed, come from one
vocabulary. Branch on status; treat the reason as a hint for your support
team.
| Reason | |
|---|---|
rejected_by_provider | The network refused it. |
insufficient_funds | The wallet could not cover it. |
timeout | Nobody approved within 60 minutes. Reversible for 24 hours. |
Testing
A sk_test_ key prompts no phone. The charge resolves in the same request, by
amount alone:
amount_minor | Result |
|---|---|
999999 | failed, failure_reason: insufficient_funds |
999998 | pending, and it stays there |
| anything else | succeeded |
More on the Testing page.
Developer notes
Phone formats
We recommend international form without the +: 250788123456. 0788123456
and +250788123456 are accepted too.
How the network is read
Send the payer's network, MTN or Airtel.
Amounts are in minor units
Every amount is in minor units, two places for every currency, including
UGX, which has no coins. Multiply by 100: 5,000 RWF is 500000, and 50,000 UGX
is 5000000. Mobile money moves whole units, so amount_minor must be a
multiple of 100. We refuse to round it either way: rounding up takes money
you did not ask for, and rounding down leaves you short with no record of why.
Fees
The fee comes from your plan and is taken out of the amount: net_minor is
what reaches your balance. GET /charges/fee?currency=RWF&amount_minor=500000
quotes it. The fees in the examples above are made up.