On this page
Your customer is ready to pay. They are on your website on their phone. You send them a Paybill number in WhatsApp and ask them to confirm with a screenshot. Half never complete the step. M-Pesa website integration in Kenya fixes that friction — payment happens on the page, confirmation is automatic, and you look like a serious business.
This guide explains how M-Pesa on websites actually works, what Nairobi SMEs need, and realistic costs.
Why M-Pesa on Your Website Matters
Kenya runs on M-Pesa. Card penetration is lower than mobile money. If you sell services, courses, bookings, or products online, M-Pesa is not optional — it is the default checkout.
| Method | Customer experience | Best for |
|---|---|---|
| Manual Paybill + screenshot | High friction | Informal start |
| Till number on contact page | Medium friction | Simple retail |
| STK Push on checkout | One tap on phone | E-commerce, bookings |
| Payment gateway (Pesapal, etc.) | M-Pesa + card | Larger catalogues |
A professional web design in Nairobi package can include payment buttons wired to your Till or gateway.
Main Ways to Integrate M-Pesa
1. Display Paybill or Till (no API)
Cheapest setup: show your Paybill, account number, or Till on a payments page with clear instructions. No developer API required. Works for consultants and service businesses with low volume.
Downside: manual reconciliation. Customers forget to send confirmation.
2. M-Pesa STK Push (Lipa na M-Pesa Online)
Customer enters phone number on your site. They receive a Safaricom prompt. They enter PIN. Your system gets an instant callback confirming payment.
Requires:
- Registered business with Safaricom
- Daraja API credentials (consumer key, secret, passkey)
- HTTPS website
- Server-side code to initiate and verify transactions
This is what most Kenyan e-commerce sites mean by "M-Pesa integration."
3. Payment gateways
Providers like Pesapal, Flutterwave, and DPO bundle M-Pesa with cards and bank transfer. Faster to launch if you do not want to manage Daraja directly. They charge per transaction.
Good for hotels, schools, and shops with higher volume — see our hotel website design Kenya page for hospitality use cases.
Step-by-Step: Getting STK Push Live
- Register business — certificate, KRA PIN, director ID
- Apply for Lipa na M-Pesa Online via Safaricom or your bank
- Create Daraja app at developer.safaricom.co.ke
- Go live credentials — after sandbox testing
- Developer integrates STK Push on checkout or invoice page
- Test with real KES 1 transactions before marketing
Timeline: 1–3 weeks for Safaricom approval, plus 2–5 days development for a simple integration.
What Your Website Needs Before Integration
- SSL certificate (HTTPS) — required for payment trust and API callbacks
- Clear pricing — customers must see amount before STK prompt
- Order or invoice reference — ties payment to a booking or cart
- Confirmation page — "Payment received" after callback success
- Privacy policy — states how phone numbers and payment data are handled
We include SSL, mobile checkout layout, and payment page structure in Growth and Professional packages — see pricing.
Costs: Integration vs Transaction Fees
| Item | Typical cost |
|---|---|
| Daraja API setup | Free (Safaricom) |
| STK Push development | KES 15,000–40,000 one-time |
| Gateway setup | Often free; per-tx fees |
| M-Pesa transaction fee | Varies by amount (Safaricom tariff) |
| Gateway fee | ~1–3% per transaction |
A KES 30,000 website with working M-Pesa often pays for itself with a handful of online sales that would have been lost to WhatsApp friction.
Security and Trust
- Never store M-Pesa PINs — STK Push keeps PIN on the phone only
- Verify callbacks server-side — do not trust client-side "paid" flags
- Use official APIs or licensed gateways only
- Show your business name on the STK prompt — customers check this
Common Mistakes Nairobi Businesses Make
- Screenshot culture — works until you scale
- No HTTPS — browsers warn users; APIs fail
- Testing only in sandbox — go live before marketing payments
- No receipt email — customers want confirmation
- Hiding Till on image — use clickable buttons and copy fields
Conclusion
M-Pesa website integration in Kenya turns your site from a brochure into a sales channel. Start simple with Till on a payments page, then upgrade to STK Push when volume justifies it.
Need a site built for payments from day one? Contact us or run a free audit on your current setup. We build mobile-first checkout flows for Nairobi businesses — from salons taking deposits to hotels confirming bookings.
Ready to get your Kenya business found on Google?
Start with a free website audit.
