The verdict in three sentences
A good mobile money SDK exposes one interface (pay(), getStatus(), refund()) that hides MTN, M-Pesa and Airtel behind a clean state machine. The three reliability pillars in Africa: idempotency keys, retry with backoff, and an offline queue to survive weak 3G. Without all three you either double-charge buyers or lose the confirmation.
The 5-status state machine
Every payment follows a strict lifecycle. Each transition must be idempotent and logged.
| Status | Meaning | Next action |
|---|---|---|
| initiated | request created, idempotency key set | send to operator |
| pending | awaiting buyer confirmation | poll / webhook |
| success | server-confirmed | confirm the order |
| failed | declined (balance, timeout, PIN) | offer another rail |
| refunded | refunded via API | credit the buyer |
Absolute rule: only move to success on a signed server confirmation, never on the browser redirect. A mishandled pending to success transition is the top cause of accounting bugs.
Recommended reliability settings (2026)
The parameters that make the SDK robust on unstable networks.
| Parameter | Recommended value | Why |
|---|---|---|
| Payment timeout | 90 s | covers OTP + validation |
| Max retries | 3 | avoids operator spam |
| Backoff | 2 s, 4 s, 8 s | exponential |
| Polling interval | 200 ms -> 5 s | fast then spaced |
| Webhook signature check | HMAC required | anti-fraud |
| Offline queue | persistent (SQLite) | survives 3G drops |
The idempotency key (one per transaction) guarantees a retry never creates a second charge. This is the most critical point on unstable African networks, where a request can succeed server-side without the client receiving the response.
Need a professional website?
Kolonell builds websites that attract clients, optimized for the Sénégalese market. Free quote in 2 minutes.
Mini case study
Brian builds a delivery app in Nairobi. Without an offline queue, 8% of payments failed on 3G drops in peri-urban zones: on 500 transactions/month at KES 500, that is 40 lost payments = KES 20,000 uncollected. After adding a persistent offline queue and retry-with-backoff, the failure rate drops to 1.5%, i.e. ~8 lost payments. He recovers ~KES 16,000/month for one extra day of development.
FAQ
Why is an idempotency key essential? On unstable 3G a request can succeed without the response returning. Without an idempotency key the retry creates a second charge. It is non-negotiable.
What timeout should I use? 90 s covers OTP entry and operator validation. Below 60 s you cut off legitimate buyers on slow networks.
Is the offline queue really worth it? Yes: it persists pending payments in SQLite and replays them on reconnect. It typically cuts the failure rate from 8% to under 2%.
How many retries? 3 maximum with exponential backoff (2 s, 4 s, 8 s). Beyond that you risk overloading the operator and getting rate-limited.
Must I verify the webhook signature? Always. An HMAC check stops an attacker forging a payment confirmation. An unsigned webhook must never confirm an order.
Let's talk about your project. We build your multi-operator React Native payment SDK, idempotent and resilient to weak 3G. WhatsApp +221 77 596 93 33.
Mohamed Bah
Fondateur, Kolonell
Passionate about digital and entrepreneurship in Africa, Mohamed has been helping Sénégalese businesses with their digital transformation since 2020. Founder of Kolonell, he believes every SME deserves a professional and accessible online présence.

