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. A sk_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: MTN or Airtel.
Facts for Rwanda
Rwanda
CurrencyRWF (country_code RW)
Phone format250788123456. Also accepted: 0788123456, +250788123456.
NetworksMTN or Airtel
CollectMTN and Airtel mobile money
Pay outMTN and Airtel mobile money, Bank account. A bank payout needs a bank_code from GET /payout-banks?country_code=RW.
AmountsWhole francs: amount_minor a multiple of 100. 5,000 RWF is 500000.
Test numbersYes, for payouts: +250788000001 to +250788000005 force an outcome.

How it works

  1. You create a charge with the payer's number and network.
  2. We send a prompt to the payer's phone, and they approve it.
  3. You receive charge.succeeded, and the money is in your balance.

Nothing is taken until the payer approves.

Step 1 — Create the charge

5,000 RWF from an MTN wallet
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"
    }
  }'
201 Created (live)
{
  "id": "3f1c9a2e-...",
  "reference": "ORDER-1042",
  "amount_minor": 500000,
  "currency": "RWF",
  "status": "created",
  "channel": "mobile_money",
  "failure_reason": null,
  "is_test": false
}
Field
idempotency_keyrequired8–128 characters. Yours. Send it again and you get the original charge back.
amount_minorrequiredWhole francs: a multiple of 100. 5,000 RWF is 500000.
currencyrequiredRWF.
reference, channeloptionalYour own reference, and mobile_money.
payer.phone_numberrequired250788123456. 0788123456 and +250788123456 are accepted too.
payer.networkrequiredMTN or Airtel.
payer.country_coderequiredRW.

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

StatusWhat it means
createdAccepted. Not yet sent to the payer's phone. Sending happens shortly after the response, not inside it.
pendingThe prompt is on the payer's phone. Nobody has paid yet.
succeededThe payer approved. net_minor is credited to your balance straight away.
failedThe 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:

EventWhen
charge.createdThe charge exists.
charge.succeededThe payer paid. The payload carries fee_minor, net_minor and reconciled_late.
charge.failedIt 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:

charge.succeeded
{
  "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.

StatuscodeWhat happened
400INVALID_CHARGEA non-positive amount, or a payer whose country_code contradicts their number.
403INSUFFICIENT_AUTHORITYThe key lacks payments:write.
404ACCOUNT_NOT_FOUNDaccount names no account of yours in this key's mode.
409ACCOUNT_NOT_ACTIVEaccount is closed. A frozen account still receives.
422CURRENCY_NOT_ACTIVATEDaccount does not hold the charge's currency.
422VALIDATION_FAILEDA field is missing or malformed, including any fee_minor other than 0. The body names the field.
StatuscodeWhat happened
400INVALID_CHARGEThe 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_providerThe network refused it.
insufficient_fundsThe wallet could not cover it.
timeoutNobody 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_minorResult
999999failed, failure_reason: insufficient_funds
999998pending, and it stays there
anything elsesucceeded

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.

What's next

On this page