How to Accept M-Pesa Payments on Your Website (2026 Guide for Kenya)

All the ways to accept M-Pesa on your website in Kenya, from payment gateways to the Daraja API, with WooCommerce setup tips and what it costs.

Take M-Pesa on your site | Sedi Digital guide

Key takeaways

  • Most Kenyans prefer to pay online with M-Pesa, so a website without it loses sales.
  • Payment gateways are the fastest route and also add cards, Airtel Money and bank payments.
  • The Daraja API gives you your own Paybill or Till on checkout and more control, but needs a developer.
  • STK push, where the customer just enters their PIN, gives the smoothest checkout.

In Kenya, M-Pesa is how most people pay. If your website only accepts cards, or asks customers to “send money and share the confirmation message on WhatsApp”, you are losing sales to friction. Customers expect to tap “Pay with M-Pesa”, enter their PIN and be done.

This guide explains every practical way to accept M-Pesa payments on a website in Kenya, the pros and cons of each, and how to choose.

Your three main options

  1. Manual Paybill or Till on the page: show your number and ask customers to pay and send the code.
  2. A payment gateway: a provider that handles M-Pesa, cards and more through one integration.
  3. Direct Daraja API integration: connect your website straight to Safaricom’s M-Pesa API.

Option 1: Manual Paybill or Till

This is where many businesses start. It works, but it is slow and error-prone: someone has to match every confirmation message to an order, customers sometimes send the wrong amount, and many people abandon the purchase halfway. It is fine for a few orders a week, not for a growing online shop.

Option 2: Use a payment gateway

Gateways are the fastest, lowest-risk way to accept M-Pesa online. Providers active in Kenya include Pesapal, Paystack, Flutterwave, IntaSend, DPO and others. Most offer:

  • M-Pesa via STK push, so customers just enter their PIN.
  • Card payments (Visa and Mastercard), plus Airtel Money and bank options with some providers.
  • Ready-made plugins for WooCommerce, Shopify and other platforms.
  • A dashboard showing every transaction, refunds and settlements.

Trade-offs: customers may see the gateway’s Paybill rather than your own, you pay a percentage per transaction, and money is settled to your bank or M-Pesa on the gateway’s schedule rather than instantly. Compare fees, settlement times, supported methods and support quality before choosing.

Option 3: Integrate directly with the Daraja API

Safaricom’s Daraja platform lets developers connect websites and apps to M-Pesa. The most useful API for online shops is M-Pesa Express (STK push). You will need:

  • Your own Paybill or Till number (Lipa na M-Pesa) registered to your business.
  • A Daraja account and an app with production credentials, which requires going live through Safaricom’s process.
  • A developer to build the integration, handle callbacks securely and update orders when payments are confirmed.
  • Secure hosting with HTTPS, as payment confirmations are sent to your server.

Why choose it: customers see your own business name and number, money lands in your M-Pesa account directly, and at high volumes it can cost less than gateway fees. It also lets you build extras such as automatic refunds or payouts using other M-Pesa APIs.

Which option should you choose?

Your situation Best fit
A few orders a week, testing demand Manual Paybill or Till, or a simple gateway link
Growing online shop, want cards too Payment gateway with a WooCommerce or Shopify plugin
High volume, M-Pesa-first, want your own Paybill Direct Daraja integration
Want both control and cards Daraja for M-Pesa plus a gateway for cards

Setting up M-Pesa on WooCommerce

  1. Choose your gateway or Daraja plugin and create the merchant account.
  2. Install the plugin and enter your credentials in WooCommerce payment settings.
  3. Test in sandbox mode with test numbers before going live.
  4. Check that orders move from “pending” to “processing” automatically when payment succeeds.
  5. Set up email and WhatsApp order confirmations so customers know their payment went through.

Checkout tips that increase completed payments

  • Put “Pay with M-Pesa” first; it is what most Kenyan customers want.
  • Ask for the phone number in the familiar 07XX format and convert it in the background.
  • Tell customers what will happen: “You will get a prompt on your phone. Enter your M-Pesa PIN to pay.”
  • Show delivery costs before checkout to avoid surprises.
  • Offer a fallback, such as manual Paybill, if the prompt does not arrive.
  • Keep the checkout short and fast on mobile.

Security and compliance

Never store M-Pesa PINs or card details on your server. Use HTTPS everywhere, keep plugins updated, restrict admin access and verify payment callbacks before marking orders as paid. Collect only the customer data you need and handle it in line with Kenya’s Data Protection Act, 2019.

Build a website that sells

Payments are the last step of a good online store. The steps before, a fast site, clear product pages and trust signals, matter just as much. Read how to build a business website that brings in customers, or let our team build and integrate it for you through our web design and development service. Plan your project to get a quote.

Frequently asked questions

Can I accept M-Pesa on my website without a Paybill?

Yes. Payment gateways let you accept M-Pesa through their own Paybill and settle the money to your bank or M-Pesa account. To show your own Paybill or Till on checkout, you need your own number from Safaricom and a Daraja API integration.

What is M-Pesa STK push?

STK push (also called Lipa na M-Pesa Online or M-Pesa Express) sends a payment prompt to the customer's phone. They enter their M-Pesa PIN and the website receives a confirmation automatically. It removes the need to type a Paybill number and account manually.

How much does it cost to add M-Pesa to a website?

Gateways usually charge a percentage per transaction and little or no setup fee. A custom Daraja integration costs development time up front, and transaction charges depend on your Safaricom tariff. For most small shops, a gateway plugin is the cheapest way to start.

Does M-Pesa work with WooCommerce?

Yes. Several Kenyan gateways and Daraja-based plugins integrate with WooCommerce, so customers can choose M-Pesa at checkout and orders update automatically when payment is confirmed.

Ready to turn more clicks into clients?

Tell us where you want to grow. We will reply within one working day with a clear plan and a fixed monthly proposal.

Free 30 minute strategy call

Book your strategy call

Which day suits you?

What time? (Nairobi time)

How should we meet?