Setting up M-Pesa checkout on your online store.
A plain-English walkthrough of taking mobile-money payments without scaring buyers away.
Published 19 May 2026 · 7 min read · by Webtech Solutions KE

Karibu! Let’s start with the obvious: in Kenya, if your online store doesn’t take M-Pesa, you don’t really have an online store — you have a catalogue with a “call us” button. Card payments matter for international buyers, but for the local market, M-Pesa is how people pay. The question isn’t whether to add it, it’s which way to add it. There are three main routes, and they’re very different in cost, effort and customer experience.
Option 1: The manual route — Till or Paybill plus a confirmation
This is the duka method, moved online. You display your Till number (Buy Goods) or Paybill at checkout, the customer pays from their M-Pesa menu, then sends you the confirmation message or enters the transaction code on your site. You check your phone, see the payment, and process the order.
- Good: cheapest to set up, works with any website, customers already know how Buy Goods works.
- Bad: manual confirmation means delays and typing mistakes; orders arrive while you sleep but stay unconfirmed until you wake up; it doesn’t scale past a handful of orders a day.
Honest verdict: a fine starting point for a side hustle, frustrating for a serious store.
Option 2: The integrated route — STK Push via the Daraja API
This is the experience customers love. They enter their phone number on your checkout page, tap “Pay”, and their phone immediately pops up the M-Pesa PIN prompt — that pop-up is called an STK Push (you’ve seen it on Jumia, Naivas and most serious Kenyan stores). They enter their PIN, and your website confirms the payment automatically within seconds. No Paybill numbers to copy, no codes to paste, no waiting.
It works through Safaricom’s Daraja API (“Lipa na M-Pesa Online”), which connects your website directly to M-Pesa. To use it you’ll need:
- A registered business with a Till or Paybill number (a Lipa na M-Pesa business account from Safaricom).
- A Safaricom Daraja developer account, where your shortcode gets API credentials and goes through Safaricom’s go-live process.
- A developer to integrate it: the payment prompt, the automatic confirmation callback, receipts, and what happens when a payment fails or times out.
That last part is where stores get burned. The happy path is easy; the edge cases — customer enters the wrong number, PIN prompt times out, payment succeeds but the confirmation callback is missed — are where real engineering matters. Done right, the store reconciles itself: every payment is matched to an order automatically, with a paper trail.
Option 3: The aggregator route — one integration, many payment methods
Payment aggregators and gateways (Pesapal, DPO, Flutterwave, IntaSend and friends) sit between your store and the payment networks. One integration gets you M-Pesa, Airtel Money and cards together, usually with ready-made plugins for platforms like WooCommerce.
- Good: fastest way to accept everything, including international cards; less custom engineering; settlement and reconciliation handled for you.
- Bad: a percentage fee on every transaction on top of M-Pesa’s own charges, and slightly less control over the checkout experience.
For stores that want cards plus mobile money without building two integrations, this is often the pragmatic choice. Compare fees carefully — a percentage point matters once you’re doing real volume.
Which one should you pick?
- Just starting, a few orders a week: manual Till/Paybill is fine. Spend your money on products and marketing first.
- Growing local store, M-Pesa is 90% of your sales: direct Daraja STK Push integration — the smoothest checkout and the lowest per-transaction cost.
- Local + international customers: an aggregator, so cards and mobile money live in one checkout.
Checkout UX: where Kenyan stores lose buyers
Whichever route you choose, the checkout design decides whether people finish paying. The mistakes we fix most often:
- Asking for too much. Name, phone, delivery point. That’s it. Every extra field costs you completed orders.
- Hiding the total. Show the full amount — including delivery — before the PIN prompt appears. Surprises at the PIN stage kill trust instantly.
- No instant confirmation. The moment payment lands, the customer should see “Asante! Order confirmed” on screen and get a message with their order details. Silence after payment is how you earn panicked calls.
- No failure path. PIN prompts time out; phones run out of battery; people get distracted. Always offer a clear “Try again” instead of a dead end.
- Desktop-first design. Your buyers are on phones. Test the entire payment flow on a mid-range Android on mobile data before launch day.
What about trust?
Kenyan buyers are rightly cautious — everyone knows someone who paid a “seller” on Instagram and received silence. Your checkout earns trust with small signals: a real business name on the Till (the name shown at the PIN prompt should match your brand), a physical location or pickup point, a working phone number, clear refund terms, and reviews. An AI agent on WhatsApp that answers questions instantly helps too — silence is what scares buyers, before and after payment.
Want it done properly?
We build online stores with M-Pesa checkout as a core feature, not an afterthought — STK Push, automatic confirmation, receipts and reconciliation included. See our e-commerce & M-Pesa services, browse the portfolio, or get a free quote and tell us what you’re selling.
Related reading
Ready to sell online?
Tell us what you’re selling — we’ll reply with a clear plan for your store, M-Pesa included, and a free quote.