E-commerce11 min read

Integrating the M-Pesa Daraja API into a Nairobi shop (2026)

Mohamed Bah·Fondateur, Kolonell
August 18, 2026
Share:
Integrating the M-Pesa Daraja API into a Nairobi shop (2026)

Integrating the M-Pesa Daraja API into a Nairobi shop (2026)

E-commerce

The verdict in three sentences

In Nairobi, the M-Pesa Daraja API fires an STK-push: the buyer confirms the PIN directly in their phone within 60 s without leaving your shop. In Douala, Orange Money Cameroun uses a web-redirect with OTP and a 120 s window, sending the buyer to a hosted page. Both work, but UX, timeouts and daily caps differ sharply.

M-Pesa Daraja vs Orange Money Cameroun: 6 data points

Before writing a line of code, compare the two rails on the criteria that break a checkout.

CriterionM-Pesa (Daraja)Orange Money CM
FlowSTK-push in-appWeb-redirect + OTP
Timeout window60 s120 s
Merchant fee0.55% (till tiers)~1.7%
SettlementT+1T+1
Daily capKES 250kXAF 500k
Sandboxfull Daraja sandboxavailable

Reading: M-Pesa is cheaper and the STK-push converts better, but it stays Kenya-only. Orange Money covers Cameroon and the CEMAC zone with a higher daily cap in value terms.

The STK flow and callback setup

The classic Daraja trap: mis-handling the callback ResultCode and confirming a payment that failed. Here is the sandbox-to-prod checklist.

StepM-Pesa DarajaOrange Money CM
1. Authconsumer key/secretOAuth2 token
2. Init paymentSTK-push requestPOST payment, get payUrl
3. Buyer actionconfirm PIN on phoneenter OTP on payUrl
4. CallbackResultCode callbacksigned notif to your URL
5. Verifyquery STK statusGET status by txn id
6. Go-liveproduction shortcodeIP whitelist + cert

Typical decline reasons to handle cleanly: insufficient balance, expired OTP/PIN, daily cap reached, wrong network. Show a clear message and offer another rail.

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

Wanjiru runs an electronics shop in Nairobi. Average basket KES 4,500, 120 orders/month. M-Pesa till fee at 0.55%: 4,500 x 120 x 0.55% = ~KES 2,970/month. An equivalent Douala shop on Orange Money at 1.7% would pay far more in fees. Wanjiru keeps M-Pesa because it captures over 90% of Kenyan buyers: without it she would lose far more than KES 2,970 in sales.

FAQ

Does Orange Money Cameroun offer an STK-push? Not broadly in 2026: its flow is mainly web-redirect with OTP. The STK-push is M-Pesa's strength via Daraja.

How long to get an M-Pesa till/shortcode? The Daraja sandbox is instant; a production go-live shortcode takes a few days of Safaricom review in 2026, versus 10-20 working days for Orange Money merchant KYC.

What if the callback never arrives? Always add a fallback poll on the status endpoint every 5-10 s during the timeout window. Confirm the order only on server confirmation.

What daily cap should I plan for? M-Pesa caps around KES 250k/day per account; Orange Money Cameroun around XAF 500k. Adjust your basket limits accordingly.

Can I test real failure cases? Yes, both offer a sandbox. Test the failure paths (expired PIN, timeout) before production; that is where 80% of bugs surface.

Let's talk about your project. We wire M-Pesa Daraja or Orange Money with a reliable callback and fallback polling. WhatsApp +221 77 596 93 33.

Tags:#orange money#m-pesa#daraja api#cameroun#kenya#integration#stk push
Share:

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.