Websites11 min read

Integrating the M-Pesa Daraja API Into Your Store (Kenya) in 2026

Mohamed Bah·Fondateur, Kolonell
August 25, 2026
Share:
Integrating the M-Pesa Daraja API Into Your Store (Kenya) in 2026

Integrating the M-Pesa Daraja API Into Your Store (Kenya) in 2026

Websites

The verdict in three sentences

M-Pesa's Daraja API is in 2026 the most battle-tested mobile money stack in East Africa, built around STK Push and asynchronous callbacks. The technical integration takes a day, but merchant onboarding (2 to 5 days) and reconciliation of settlements require planning. The real risk is not the code: it is fulfilling an order before you have received and validated the confirmation callback.

Fees, limits and Daraja onboarding 2026

Daraja (Safaricom's developer platform) exposes STK Push, C2B, B2C and transaction status endpoints. Here are the 2026 orders of magnitude for a Kenyan till/paybill merchant.

Item2026 value (estimate)
Merchant fee per transaction~1.5 % (tariff band)
Settlement to bankSame/next day
Single transaction limitKES 250,000
Daily wallet limitKES 500,000
Settlement delayNear-instant to till
Merchant onboarding2 to 5 business days
CurrencyKES
Countries coveredKenya (Tanzania via separate stack)

A paybill or till number plus a Daraja developer account are required. You start in sandbox, then request production credentials once your callback endpoints are validated.

Technical integration checklist

The STK Push flow prompts the customer's phone for a PIN, then Safaricom posts the result to your callback URL. Never confirm an order on the browser return alone.

StepActionCommon pitfall
1. TokenGet OAuth access tokenNot caching the 1h token
2. STK PushPOST STK Push with amount + phoneWrong shortcode/passkey
3. CallbackListen on your callback URLEndpoint not publicly reachable
4. VerifyQuery transaction statusTrusting callback payload only
5. IdempotencyStore CheckoutRequestIDDouble-counting on retries
6. TimeoutSTK prompt expires ~60sNot handling user cancel

Safaricom retries callbacks, so store each CheckoutRequestID and make your handler idempotent. Your callback URL must be HTTPS and publicly reachable — a frequent blocker in sandbox testing.

Mini case study

Grace runs a cosmetics shop in Nairobi with an average basket of KES 1,800 and 300 orders a month, roughly KES 540,000 in monthly revenue. At ~1.5 % M-Pesa fees, she pays about KES 8,100 per month. Versus an international card gateway at 2.9 % plus fixed fees, she saves meaningfully while offering the payment method her customers actually use. The integration shipped in 3 days, 2 of which were merchant validation.

Need a professional website?

Kolonell builds websites that attract clients, optimized for the Sénégalese market. Free quote in 2 minutes.

Prefer a call back?

Leave your WhatsApp number and a Kolonell expert will get back to you within 1 business day. Free, no strings attached.

You are :

FAQ

What does M-Pesa really cost a merchant in 2026?

Merchant fees fall in a tariff band around 1.5 % per transaction, with no monthly subscription for basic Daraja access. On KES 540,000 in sales that is roughly KES 8,100.

Do I have to handle callbacks?

Yes. The customer may close the app after paying. Only the Daraja callback, confirmed via a transaction status query, guarantees the payment was actually captured.

How long to activate a paybill/till?

Expect 2 to 5 business days after submitting your documents. Budget this delay so it does not block your go-live.

Does Daraja work outside Kenya?

Daraja is Kenya-focused in 2026; Tanzania and other markets use separate M-Pesa stacks with different endpoints and limits.

Can I automate refunds?

Reversals are supported via the B2C/reversal APIs; implementing a refund endpoint automates product returns without manual back-office work.

Let's talk about your project. We integrate M-Pesa Daraja into your store with tested callbacks and a clean go-live. WhatsApp +221 77 596 93 33.

Tags:#wave business api#m-pesa daraja#integration#boutique#stk push#webhook#2026#checkout
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.