Why M-Pesa should be the first option at your checkout
Every extra step at checkout is a chance for a buyer to give up. In Kenya, the payment method most people already use every day is M-Pesa, so making it the easiest option is usually the single most useful change an online shop or booking site can make.
By Dylan MakoriUpdated 6 min read
Why a card checkout loses people
A card payment on a phone asks a lot of the buyer, one small hurdle at a time:
- Finding the card and typing sixteen digits, an expiry date and a security code on a small screen.
- A redirect to the bank's security page, and a one-time code by SMS.
- A failed or declined payment with no clear reason, and the question of whether they were charged anyway.
Many Kenyan buyers do not have a card, or would rather not use one online. For them, a card-only checkout is not a hurdle; it is a dead end.
How M-Pesa checkout works
With an STK push, the buyer enters their phone number on your site and a payment prompt appears on their phone. They enter their M-Pesa PIN and they are done. There is nothing to find, nothing to type beyond the number, and the confirmation arrives straight away on both sides.
Three ways to add it
1. Directly through Safaricom's Daraja API
The official route. Your site talks to Safaricom directly, which gives you the most control and no middleman. It needs a registered business with a paybill or till, a developer comfortable with the API, and careful handling of payment confirmations.
2. Through a payment provider
Several Kenyan and international providers bundle M-Pesa with cards and other methods behind one integration, with dashboards and receipts included. It is usually quicker to set up. Compare their current fees, settlement times and support before choosing, as these change.
3. Showing your till or paybill number
The buyer pays manually and you confirm by hand. It costs nothing to set up and works for very small volumes, but it does not scale and it relies on people typing the right amount and reference.
Getting the checkout right
- Put M-Pesa first and pre-select it, with card and other options available beneath it.
- Say what happens next: “A prompt will appear on your phone. Enter your M-Pesa PIN to pay.”
- Handle the failures gracefully. If the prompt times out or the balance is low, let the buyer retry or switch method without starting again.
- Confirm clearly, on screen and by SMS, email or WhatsApp, with an order number they can refer to.
- Record every payment against its order automatically, so nobody has to match M-Pesa messages to orders by hand.
Before you build
M-Pesa checkout pays off when people can find your products and get to the checkout comfortably on a phone. If your site is slow or confusing before that point, fix that first: our free health report shows how your site performs on a phone and what to fix first.