Why M-Pesa on your website matters
M-Pesa is not optional for Kenyan e-commerce — it is the default. Card penetration is growing but phone payment remains dominant for retail, fees, deposits, and invoices. A "pay via Paybill" instruction buried in PDF is not integration; customers abandon carts when checkout is confusing.
Proper website integration means STK Push prompts on the customer's phone, automatic payment confirmation, order status updates, and reconciliation logs for your finance team — connected to Safaricom Daraja API with secure credential handling.
Integration options we build
- STK Push (Lipa na M-Pesa Online) — customer enters phone on checkout, approves PIN prompt, payment confirms instantly
- Paybill & Till display — account number generation, copy-friendly UI for manual payers
- C2B confirmation — webhook callbacks when payments hit your Paybill
- B2C refunds — automated reversals where business rules allow
- Subscription & recurring — standing orders for memberships, rent, SaaS
- Split payments — deposit now, balance on delivery for high-value orders
- Multi-tenant — marketplaces routing payments to vendors with platform fee
Where M-Pesa integration is used
E-commerce checkout — cart to M-Pesa confirmation to shipping workflow. Hotel bookings — deposit to hold room. School fee portals — parent login and instant payment posting. Restaurant catering — event deposits. Property reservations — holding fees for off-plan units.
Service businesses — invoice payment links sent via SMS or email with unique account references. Integration with POS and ERP keeps online and in-store revenue in one ledger.
Daraja API technical process
Safaricom Daraja is the official M-Pesa API platform. Integration requires a registered business Paybill or Till, production credentials after sandbox testing, SSL-secured callback URLs, and idempotent payment handling (customers double-tap; networks retry).
Breon Studio handles OAuth token management, STK Push initiation, callback validation, timeout handling, and admin dashboards showing transaction status — pending, completed, failed, reversed. We never store customer PINs; authentication stays on the Safaricom SIM toolkit.
- Sandbox prototyping with test credentials
- Paybill/Till production approval with Safaricom
- Checkout UX design — phone input, amount, confirmation states
- Backend integration — initiate, callback, reconcile
- Admin reporting — export CSV for accounting
- Go-live monitoring and failover messaging
M-Pesa plus card and other methods
Many Kenyan businesses offer M-Pesa plus Visa/Mastercard via Pesapal, Flutterwave, or Stripe for diaspora customers. We implement payment method tabs with unified order records — one admin view regardless of rail.
Read e-commerce cost guide for how payment integration affects project pricing.
Pricing and timeline
Basic STK Push on existing website or WooCommerce: KES 40,000–80,000. Custom checkout with cart, callbacks, admin reconciliation, and ERP sync: KES 80,000–200,000. Marketplace split payments scope individually. Timeline: 2–6 weeks after Paybill credentials are ready — Safaricom approval can add lead time.
Compare WordPress vs custom — plugin M-Pesa often breaks on updates; bespoke integration is more maintainable for revenue-critical flows.
Common mistakes to avoid
- Screenshot Paybill numbers instead of live confirmation — customers pay wrong reference
- No callback URL — manual reconciliation forever
- Unsecured credentials in frontend JavaScript — fraud risk
- Missing timeout handling — orders stuck "pending" when customer cancels PIN
- No test in production with real KES 1 transactions before marketing launch
Breon Studio has integrated M-Pesa across retail, hospitality, education, and property — ask for a demo flow during discovery.