The verdict in three sentences
A properly wired M-Pesa checkout collects where a careless redirect loses up to 8 % of carts at the moment of payment. The golden rule: never confirm an order on the browser return, only on the signed server callback. With till fees on low tiers, M-Pesa STK Push is among the cheapest rails in East Africa, provided you handle latency and timeouts.
The end-to-end technical flow
An M-Pesa payment follows a clear pattern: server-side STK Push request, USSD PIN prompt on the customer's phone, confirmation via callback URL. Trap number one is treating the browser return as proof of payment — the customer may close the tab before the return while payment succeeded, or the reverse. Only the callback is authoritative.
| Technical parameter | Recommended 2026 value | Why |
|---|---|---|
| Till fees (Daraja) | 0 to 0.55 % tiers | Charged on the collected amount |
| Prompt latency | 3 to 5 s | Network + USSD validation |
| Session timeout to set | 90 s | Avoids cancelling a slow payment |
| Payment source of truth | Signed callback | Never the browser return |
| Callback retries | 3 to 5 attempts | Plan for idempotency |
| Status to store | pending / paid / failed | Clear state machine |
Trap number two is idempotency: M-Pesa may resend the same callback several times. Without a stored idempotency key, you risk confirming the same order twice.
Redirect vs completion: the real cost
The conversion gap between a clean funnel and a neglected one is measurable. Here is a 2026 order of magnitude seen on mid-sized Nairobi stores.
| Checkout scenario | Completion rate (est.) | Carts lost per 1,000 |
|---|---|---|
| Redirect without reliable callback | 61 % | 390 |
| STK Push + callback + retry | 84 % | 160 |
| Timeout too short (30 s) | 55 % | 450 |
| Timeout at 90 s + retry | 86 % | 140 |
| Clear error message to customer | +6 pts | — |
| Pre-filled number | +4 pts | — |
At an average cart of KES 2,000, moving from 61 % to 84 % completion on 1,000 attempts means 230 recovered sales, roughly KES 460,000 in additional revenue.
Mini case study
Take Grace, who runs a cosmetics store in Nairobi. She gets 800 payment attempts a month, average cart KES 2,000. Before the rebuild, her redirect without a reliable callback converted at 61 %, or 488 sales (KES 976,000). After wiring the signed callback, setting the timeout to 90 s and pre-filling the number, she reaches 84 %, or 672 sales (KES 1,344,000). Monthly gain: KES 368,000, against low till fees. The integration pays for itself in under a month.
Need a professional website?
Kolonell builds websites that attract clients, optimized for the Sénégalese market. Free quote in 2 minutes.
FAQ
Should I confirm the order on the browser return?
No, never. The browser return may not fire if the customer closes the tab. Only the signed server callback confirms payment, with a typical delay of 3 to 5 seconds.
What does M-Pesa cost the merchant in 2026?
Till fees run on low tiers (0 to 0.55 %), among the cheapest in the region compared with the 1.5 to 3.9 % of many card aggregators.
How do I avoid double-confirming an order?
Store an idempotency key per transaction and ignore already-processed callbacks. M-Pesa may resend the same event 3 to 5 times.
What timeout should I set on the payment session?
90 seconds is a good compromise: long enough to absorb a slow USSD validation on 3G, short enough to release the cart if the customer abandons.
Can I test without collecting real money?
Yes, Daraja provides a sandbox. Validate the full cycle STK Push → prompt → callback → status update before going live.
Let's talk about your project. We wire your M-Pesa checkout cleanly, signed callback and idempotency included, to reclaim lost carts. 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.
