M-Pesa Checkout for E-commerce in Kenya: STK Push, Gateways and Costs
A practical guide for Kenyan merchants choosing between direct M-Pesa STK Push and a payment gateway for an online store.
A Kenyan online shop should make payment feel as simple as buying in person. The customer chooses an item, enters a phone number, approves an M-Pesa prompt and receives confirmation. The difficult part happens behind the scenes: the order must be matched to a successful payment, failed attempts must be handled cleanly and the merchant needs records that make reconciliation possible.
The two main ways to accept M-Pesa online
| Approach | Best for | Trade-off |
|---|---|---|
| Direct M-Pesa STK Push | Businesses that need a tailored checkout and control over the payment flow | Requires development, callbacks and ongoing technical ownership |
| Payment gateway | Businesses that want M-Pesa and cards through one merchant integration | May have service or transaction fees, and less control over the checkout experience |
| Manual paybill or till reference | Very early validation or low-volume orders | Creates manual follow-up, slower confirmation and a greater chance of mistakes |
What STK Push should look like to a customer
A good checkout asks for the mobile number once, clearly displays the order total and explains that an M-Pesa prompt is coming. After the customer enters their PIN, the website should wait for confirmation and show a useful outcome: payment received, payment cancelled or payment still pending. Do not mark an order paid only because the request was sent; the payment callback is the confirmation that matters.
When a payment gateway makes more sense
A gateway can be useful when customers need more than M-Pesa: cards, bank transfer, international payments or one shared dashboard. It can also shorten the initial integration. Before choosing one, ask about settlement times, refund handling, supported currencies, transaction fees, the checkout experience on a phone and whether it fits the platform your store uses.
M-Pesa checkout is more than the payment prompt
- Order status changes only after a verified success response.
- Customers receive a receipt or confirmation page with their order reference.
- Failed or timed-out payments give the customer a safe retry path.
- Stock, delivery and booking availability are not oversold while a payment is pending.
- The business can match each payment to an order without checking message notifications by hand.
Questions to ask before you launch
- Will customers pay through direct STK Push, a gateway or both?
- How are failed payments, partial payments and refunds handled?
- Does the checkout work on slower mobile connections?
- Can staff see orders and payment status in one place?
- What are the merchant, gateway, card and platform costs after the website is live?
Choose the store platform around the payment flow
Your store platform should support the way you sell, not force customers into a clumsy workaround. Our e-commerce platform comparison covers Shopify, WooCommerce and custom stores. If you are planning the whole business rather than just the checkout, start with our guide to launching an online shop in Kenya.
For a store with up to 50 products, M-Pesa and card payments, compare the Premium package. For a more complex checkout, inventory connection or customer portal, describe the order flow before asking for a quote so the payment setup is scoped properly.
Frequently asked questions
What is M-Pesa STK Push for an online shop?
STK Push sends an M-Pesa payment prompt to a customer’s phone after they enter their number at checkout. The customer approves the payment with their PIN, and the website confirms the order after receiving a verified response.
Should I use direct M-Pesa or a payment gateway?
Direct M-Pesa works well when you need a tailored Kenyan checkout and can support the integration. A gateway is useful when you want M-Pesa, cards and sometimes other payment methods through one provider. The best choice depends on the store platform, payment volume and countries you serve.
Can an e-commerce website accept both M-Pesa and cards?
Yes. A store can offer M-Pesa alongside card payments either through a suitable gateway or separate integrations. The checkout should clearly show the payment choices and give customers a reliable confirmation after payment.
Why is payment reconciliation important?
Reconciliation matches each successful payment to the correct order. Without it, staff must compare payment messages manually, which slows delivery and creates errors. A proper checkout records order references and confirmed payment status automatically.
Get a fixed quote for your site
Tell us what you need and we'll recommend the right package. Same-day reply, Mon–Sat.
WhatsApp us — 0727 814 888