Quick answer
How to take M-Pesa payments on Shopify (and what usually breaks) in Kenya
For businesses in Kenya, plan for M-Pesa and Kenya’s Data Protection Act from the start. A Shopify store can take M-Pesa, but not out of the box: Shopify has no native M-Pesa gateway, so payments are connected through Safaricom's Daraja API.
What you will learn
- Shopify has no native M-Pesa gateway, so M-Pesa payments are connected through Safaricom's Daraja API.
- An STK Push integration puts the PIN prompt on the customer's phone with the amount already filled in, instead of asking them to type a Till number.
- A successful M-Pesa payment must mark the Shopify order paid automatically, with the M-Pesa receipt number stored on the order.
- The payment confirmation callback must be idempotent, because the same confirmation can arrive more than once.
- Most of the work in an M-Pesa integration is handling timeouts, wrong PINs, low balances and missing callbacks.
Contents 5 sections
What this means for businesses in Kenya
Most Kenyan customers pay with M-Pesa, so an STK push at checkout, confirmed straight into your order system, matters more than any other payment option.
Sites and stores built for Kenya should also meet the Data Protection Act, 2019, which the Office of the Data Protection Commissioner enforces.
What is different about Kenya?
A Kenyan online store needs M-Pesa at checkout, through Pesapal or Paystack, or directly through the Daraja API with STK push, and a clear choice between a Till and a Paybill. Deliveries within Nairobi often go by rider, with courier options for other towns, and stores compete with Jumia and Kilimall, so delivery costs must be clear early.
Kenya checklist
- M-Pesa at checkout
- Kenya’s Data Protection Act consent
- .co.ke domain in your name
- Prices in KES
- Fast pages on mobile data
Doing business online in Kenya
Kenyan customers expect to pay by M-Pesa, ideally with an STK push that pops up on their phone at checkout, and to reach a business on WhatsApp. KRA requires businesses to issue electronic tax invoices through eTIMS, and data controllers register with the Office of the Data Protection Commissioner under the Data Protection Act, 2019. Mooshfy is based in Nairobi, at Pine-tree Plaza in Westlands, and works with businesses in Mombasa, Kisumu, Nakuru and across Kenya.
For the complete detail, read the full guide: How to take M-Pesa payments on Shopify (and what usually breaks).
Frequently asked questions
Which payment methods matter most in Kenya?
M-Pesa, Airtel Money, Visa and Mastercard, Pesapal, Bank transfer. Most Kenyan customers pay with M-Pesa, so an STK push at checkout, confirmed straight into your order system, matters more than any other payment option.
Which data protection law applies to websites in Kenya?
The Data Protection Act, 2019, enforced by the Office of the Data Protection Commissioner.