Taking money online in Kenya is not one decision. It is four: which methods you accept, who processes them, how your site learns the payment succeeded, and what happens when it does not.

Get the first three right and payments become invisible. Get the fourth wrong and you spend your evenings matching M-Pesa messages to orders and arguing with customers about screenshots.

What Kenyan Customers Actually Pay With

M-Pesa first, by a distance. Safaricom reported 40.99 million one-month active M-Pesa customers in Kenya for the year ended 31 March 2026, and 1.04 million active Lipa Na M-Pesa merchants.

Cards matter for a smaller, higher-value group: the diaspora, visitors, and companies paying on a corporate card. Bank transfer still dominates large business-to-business invoices. The practical conclusion is that most Kenyan sites need M-Pesa properly integrated, and some need cards alongside it.

The Three Routes, Compared

RouteCustomer pays withMoney lands inBest for
M-Pesa direct via Safaricom's Daraja APIM-Pesa, by a prompt on their phone, or your Paybill or TillYour own Paybill or TillAlmost every Kenyan business selling to Kenyan customers
An aggregator such as PesapalM-Pesa and cards, on the gateway's payment pageYour merchant account with themOne integration covering mobile money and cards
A card gateway such as Pesapal, Flutterwave or PayPalVisa, Mastercard, international cardsYour account with that providerDiaspora, tourists, corporate buyers

The structural difference is who holds the money first. With M-Pesa direct, the customer pays your Paybill and Safaricom is the only party charging a fee. With an aggregator, they collect and pass it on, charging for the service. You are buying convenience and card coverage.

Choosing Your Mix

Fees change, so check them at the source. Safaricom sets the tariff on your Paybill or Till. Gateways set their own merchant rates and do not always publish them. Ask for the current rate in writing before you sign, and compare it against the volume you actually expect.

What You Need Before You Start

  1. A registered business, with the documents the provider will ask for.
  2. A Paybill or Till number, or a Daraja merchant account from Safaricom, for the M-Pesa route.
  3. A website on HTTPS. Safaricom and every gateway send the result back to an address on your site, and that address must be reachable securely from the internet.
  4. A real checkout that creates an order before payment, so there is something to mark paid.
  5. A phone and a card you can test with, because the only real test is a real transaction.

The Integration, Step by Step

M-Pesa, from nothing to live

  1. Get the Paybill or Till. The money needs a destination before anything else happens.
  2. Create a Daraja account and app at developer.safaricom.co.ke, which issues the consumer key and secret your site authenticates with.
  3. Build in the sandbox. Your site requests an STK Push, the prompt goes out, and Safaricom calls your callback URL with the result: paid, cancelled, wrong PIN or timed out. Handle all four.
  4. Request go-live, which links your real shortcode to production credentials.
  5. Test with real money. Run KES 1 transactions through the live Paybill before any customer does. The sandbox does not behave exactly like production.
  6. Let the callback do the work. The order is marked paid when Safaricom confirms, triggering the receipt, the stock update and the alert to your team.

The technical detail, with a working code example, is in how to add M-Pesa payments to your website. For stores specifically, see the WooCommerce M-Pesa guide.

The Rules That Keep You Out of Trouble

Never trust a screenshot

Forged M-Pesa confirmation messages are a known trick. The only acceptable proof of payment is the provider confirming it to your system directly.

Never mark an order paid on the redirect

A customer landing back on your thank-you page proves nothing. Browsers close, networks drop, URLs get typed. Mark the order paid on the callback, verified against the provider's record.

Keep credentials out of your theme

A consumer secret pasted into a theme file, or committed to a public code repository, lets somebody else transact as you. Keep keys in configuration outside the web root, and rotate anything that has ever been exposed.

Reconcile automatically, then spot-check

Every payment should already be attached to its order. Your job becomes a weekly spot check, not a nightly reconciliation session.

What Goes Wrong, and How to Handle It

SymptomUsual causeFix
Money received, order still unpaidThe callback never reached your site: firewall, security plugin, maintenance mode, or plain HTTPTest the callback URL from outside your network and allow the provider's requests
Customer says no prompt appearedThey are on a call, the line is not M-Pesa registered, or the request timed outOffer a visible "try again" button and a Paybill fallback with the reference prefilled
Duplicate paymentsThe customer retried while the first request was still openMake each attempt idempotent against your order reference, and refund promptly when it happens
Works in testing, fails on launch dayOnly the sandbox was testedAlways run live transactions before go-live
Checkout randomly failsA caching plugin caching the checkout or the callback endpointExclude both from caching

What It Costs

ItemWho charges itAmount
M-Pesa integration, done for youWPfossKES 5,000 one-time, all-inclusive
Transaction charges on your Paybill or TillSafaricomSafaricom's current business tariff
Gateway or card processingThe gatewayTheir merchant rate, quoted on application
A new shop with payments built inWPfossFrom KES 50,000

Our fee covers STK Push, Paybill and Till confirmations, B2C payouts, reconciliation and reporting, the Daraja registration with Safaricom, live test transactions and support. It is a one-time fee, not a share of your transactions. Details on the M-Pesa integration page.

Frequently Asked Questions

What payment methods should a Kenyan website accept?

M-Pesa first, because that is how most Kenyan customers pay. Safaricom reported 40.99 million one-month active M-Pesa customers in Kenya for the year ended 31 March 2026. Add card payments if you sell to the diaspora, to visitors or to companies paying on a corporate card, and keep bank transfer for large invoices.

What do I need before integrating M-Pesa?

A registered business, a Paybill or Till number or a Daraja merchant account from Safaricom, a website on HTTPS so the payment result can reach it securely, a checkout that creates an order before payment, and a real phone to test with.

Why should I never mark an order paid when the customer returns to my site?

Because a page load proves nothing. Browsers close, networks drop and URLs get typed by hand. The only trustworthy signal is the callback from Safaricom or the gateway, verified against the provider's own record before the order is marked paid.

A customer paid but my site still shows unpaid. What went wrong?

Almost always the callback never reached your site. A security plugin, a firewall rule, maintenance mode or a plain HTTP address can block the provider's request. Test the callback URL from outside your own network and allow those requests through.

How much does payment integration cost?

Our M-Pesa integration is KES 5,000 one-time, all-inclusive, covering STK Push, Paybill and Till confirmations, B2C payouts, reconciliation, Daraja registration with Safaricom, live test transactions and support. Safaricom's own transaction charges and any gateway's merchant rate are separate and set by them.

Are M-Pesa confirmation screenshots acceptable proof of payment?

No. Forged confirmation messages are a known trick. An integrated checkout does not rely on anything the customer sends you: it waits for Safaricom to confirm the payment directly to your system.

Get paid without the evening reconciliation

Tell us what your site runs on and how customers pay you today. We will wire M-Pesa in properly for KES 5,000, add cards if you need them, and test with real money before a single customer sees it. Talk to us on WhatsApp at +254 722 334 188, email hello@wpfoss.ke, or call +254 709 384 200.

Add M-Pesa to Your Site

Related: E-commerce Websites · Safaricom Daraja · Pesapal · Flutterwave