The verdict in three sentences
The M-Pesa Daraja API is the fastest route to online payments in Nairobi, built around STK Push (the push prompt sent to a customer's phone) and a signed callback URL. Integration takes roughly 2 to 5 developer days, centred on an OAuth token valid for one hour that you refresh before each batch of requests. The real bottleneck is not code but the 3 to 7 business day paybill/till onboarding with Safaricom, so start that before writing a line.
Integration steps and their duration
Daraja follows a clear flow: obtain an OAuth token, trigger an STK Push, and confirm the order only when the signed callback arrives. Never confirm an order on the client-side response alone.
| Step | Prerequisite | 2026 estimate |
|---|---|---|
| Register on Daraja portal | Safaricom line, ID | 1 day |
| Paybill / till onboarding | Business registration, KRA PIN | 3-7 business days |
| Sandbox app + keys | Portal account | Immediate |
| OAuth token endpoint | Consumer key/secret | 0.5 day dev |
| STK Push request | Shortcode + passkey | 1 day dev |
| Callback URL handler | Public HTTPS URL | 1 day dev |
| Sandbox testing | Test MSISDN | 1-2 days |
API fields and 2026 fees
STK Push needs only a few fields, which keeps integration short. Here are the key parameters and a fee order of magnitude.
| Element | Value / field | 2026 note |
|---|---|---|
Amount | Integer in KES | Min 1 KES |
BusinessShortCode | Paybill/till | Sandbox: 174379 |
CallBackURL | HTTPS | Required |
AccountReference | Your order ID | Used for idempotency |
| Till fee | 0-0.55 % | Merchant side, estimate |
| Settlement | T+1 | To M-Pesa/bank |
| OAuth token | Valid 1 hour | Refresh before expiry |
| Callback | Signed POST | Validate before fulfilling |
Mini case study
Joseph runs a sneaker store in Kilimani, Nairobi. He sells about 90 pairs a month at KES 6,500, roughly KES 585,000 in online revenue. At a 0.55 % till rate, his monthly payment fees are about KES 3,217. Had he used a 2 % card gateway, he would have paid KES 11,700, so KES 8,483 saved every month (over KES 100,000 a year). Picking the right rail is a margin decision, not an accounting detail.
Need a professional website?
Kolonell builds websites that attract clients, optimized for the Sénégalese market. Free quote in 2 minutes.
FAQ
How long until I am live with Daraja?
Expect 2 to 5 developer days, but plan mainly for the 3 to 7 business day paybill or till onboarding with Safaricom. Most stores go live within about 10 calendar days.
What are the real merchant fees in 2026?
The order of magnitude is 0 to 0.55 % on till transactions, among the lowest for Kenyan mobile money. Always confirm your merchant agreement, as tiers vary by volume.
Can I test without production access?
Yes. The sandbox provides keys and shortcode 174379 with test MSISDNs to simulate success and failure before go-live, usually within 1 to 2 days.
Is the callback really mandatory?
Yes. The client response can be interrupted or spoofed; only the signed callback should trigger final order confirmation, after you validate it.
Let's talk about your project. We integrate the M-Pesa Daraja API for your Nairobi store in under a week, onboarding included. 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.

