The verdict in three sentences
On an unstable connection, a classic payment fails the moment the network drops mid-checkout. An offline-first architecture queues the payment locally, then syncs it when the network returns, with a guard against double charging. In Mwanza, where about 30% of sessions hit a drop, this model recovers 82% of sales that would otherwise be lost.
The principle: queue then sync
Instead of requiring a continuous connection, the app stores the payment intent in an offline cart. The payment moves to a "pending" state. When the network returns, a deferred STK push request is sent to the operator, and the receipt appears on reconnection. The customer never has to restart the order.
| State / mechanism | Offline-first behavior | Benefit |
|---|---|---|
| Pending payment | Stored locally (pending) | The sale is not lost |
| Sync resume | Auto retry on reconnect | No customer action |
| Double-charge guard | Idempotency key per order | No duplicate debit |
| Receipt on reconnect | Shown + SMS | Reliable proof |
| Timeout UX | Clear "in progress" message | Reassures the customer |
| Data savings | Batched requests | Lower network cost |
Avoiding double charges, the real danger
When a request goes out with no reply, the temptation is to resend it, risking a double debit. The fix is an idempotency key: each order carries a unique ID, and the operator ignores any request bearing an already-processed key. So even if the app resends three times, the customer is charged only once.
| Network scenario | Without offline-first | With offline-first |
|---|---|---|
| Drop before validation | Cart abandoned | Queued, resumed |
| Drop after debit | Doubt, sometimes double charge | Idempotency, single debit |
| Slow network return | Customer retries manually | Automatic retry |
| Receipt | Lost | SMS + deferred display |
| Recovery rate | Low | ~82% |
In Mwanza, a PWA with an offline cart and deferred STK push applies exactly this pattern on the M-Pesa network.
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
Justina runs a small online shop in Mwanza. Out of 1,000 payment sessions per month, roughly 300 hit a network drop. Without offline-first, she lost nearly all of those sales. With queue-and-sync, she recovers 82%, or 246 sales saved per month. At an average basket of 12,000 FCFA, that is nearly 2,950,000 FCFA in monthly revenue no longer thrown away because of the network.
FAQ
What is an offline-first payment in practice? It is a payment saved locally when the network drops, then sent automatically once the connection returns. The customer restarts nothing and the sale is not lost.
How do you avoid being charged twice? With an idempotency key: each order has a unique ID and the operator ignores any already-processed request. Even after several resends, only one debit goes through.
How many sales can be recovered? In Mwanza, about 30% of sessions hit a drop; an offline-first design recovers 82% of them. On 300 dropped sessions, that is 246 sales saved.
Does the customer see a receipt if they were offline? Yes. The receipt appears on reconnection and an SMS is sent, guaranteeing proof even if the drop happened during payment.
Does this use more data? No, rather less. Requests are batched and sent at the right moment, cutting network cost on an unstable 3G connection.
Let's talk about your project. We build your offline-first checkout that survives network drops. 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.

