How to Accept M-Pesa Payments on Your Website
Four ways to take M-Pesa on your website, from a payment gateway you can set up in an afternoon to Safaricom's Daraja API, with costs in shillings, what you need to register, and which suits Shopify and WooCommerce.
By Wanjiku Kamau · Updated 2026-10-27
Key takeaways
- The easiest way is a payment gateway like Paystack (1.5% on M-Pesa). You don't need your own Till, and it works with common store platforms.
- The cheapest way is Safaricom's Daraja API connected to your own Till or Paybill. Buy Goods collections are free up to KES 500, then 0.55%, capped at KES 200. But you need a developer.
- For WooCommerce, Kopo Kopo has a plugin with STK push. For Shopify, Pesapal has an app.
- To get a Till, you'll need your ID, KRA PIN, a county business permit and a bank letter, all in the same trading name. Safaricom doesn't charge an activation fee, according to Paybill KE.
- Very small sellers can start by showing their Till number at checkout and confirming payments by hand, with no integration at all.
To accept M-Pesa on your website, the simplest route is to sign up with a payment gateway like Paystack, which adds an M-Pesa option to your checkout for 1.5% per payment. If you have a developer, you can connect directly to Safaricom through the Daraja API and pay only your normal Till or Paybill charges, which is far cheaper. And if you only get a few orders a week, you can start by displaying your Till number and confirming payments yourself.
Which option is right for you?
| Option | Cost on a KES 5,000 order | Setup effort | Best for |
|---|---|---|---|
| Payment gateway (Paystack) | KES 75 | Low: sign up, add a plugin | Most stores, especially with cards too |
| M-Pesa aggregator (Kopo Kopo, Pesapal) | Varies; ask for a quote | Low to medium | WooCommerce and Shopify stores focused on M-Pesa |
| Daraja API (direct) | KES 27.50 on a Till | High: developer, go-live process | Busy stores with a developer |
| Manual Till number | KES 27.50 on a Till | None | Small sellers, WhatsApp shops |
Costs use Paystack's published 1.5% on M-Pesa and Safaricom's Buy Goods tariff from August 2026: free up to KES 500, then 0.55%, capped at KES 200.
Step 1: Decide whether you need your own Till or Paybill
If you use a payment gateway like Paystack or Flutterwave, you don't need your own M-Pesa business number. The gateway collects for you and pays out to your bank or M-Pesa.
For Daraja, manual payments, and some aggregators, you need your own Till (Buy Goods) or Paybill:
- Till (Buy Goods): best for shops. Customers pay to a number, and you see the payment.
- Paybill: customers enter a business number and an account number, such as an order or invoice number. That makes it easier to match payments to orders, which helps on a website.
How to get a Till
Paybill KE's September 2026 guide lists what Safaricom asks for.
Sole traders:
- Original national ID and a copy
- Personal KRA PIN certificate
- County business permit in your trading name
- Bank settlement letter or stamped cheque leaf
- Passport photo
Companies: certificate of incorporation, a CR12 less than six months old, company KRA PIN, each director's ID and KRA PIN, a county permit and a company bank letter.
The detail that trips people up: your trading name must be spelled exactly the same on your KRA PIN, county permit and bank letter. Small differences can get your application rejected.
How to apply: start in the M-Pesa Business App by uploading your documents, then take the originals to a Safaricom Shop for sign-off. You'll get your Till number and Business Portal login by SMS, usually within one to three business days.
Cost: Safaricom doesn't charge an activation fee for a Buy Goods Till, according to Paybill KE. Your county permit costs KES 3,000 to 30,000, depending on your trade and county.
Option 1: Use a payment gateway (easiest)
A gateway adds M-Pesa to your checkout alongside cards. The customer picks M-Pesa, enters their phone number, approves the STK push prompt with their PIN, and your site is told the payment went through.
Paystack is the best fit for most stores:
- M-Pesa: 1.5%
- Local cards: 2.9%, international cards 3.8%
- No setup or monthly fees
- Settlement in two working days
- Payouts to M-Pesa cost KES 20 to 60
Flutterwave charges 2.9% on mobile money and passes fees to customers by default. Pesapal doesn't publish fees on a page we could load. A Kenyan web agency reports 3.5% + KES 1 on M-Pesa, so ask for a quote.
How to set it up:
- Sign up for a Paystack business account and complete verification.
- Install its plugin for your platform, or use its hosted payment page or payment links.
- Turn on M-Pesa as a payment channel in your dashboard.
- Test with a real small payment before going live.
Our comparison of Kenyan payment gateways covers all the fees in detail.
Option 2: Use an M-Pesa specialist plugin
Some providers focus on M-Pesa and offer ready-made plugins.
WooCommerce: Kopo Kopo
Kopo Kopo for WooCommerce, published on WordPress.org under Kopo Kopo's own profile, adds STK push to your checkout and sends payments to your Kopo Kopo account in real time. It also offers a manual fallback where customers pay to your Till or Paybill, with webhooks that update orders when payments arrive.
You'll need:
- A Kopo Kopo account
- WordPress 6.2+, WooCommerce 8.0+ and PHP 7.4+
- Your store currency set to Kenyan shillings
- An SSL certificate
- A Kenya-based business
We couldn't find Kopo Kopo's current fees on a public page, so ask before signing up.
Shopify: Pesapal
Shopify doesn't offer M-Pesa directly, but Pesapal has a Shopify app. According to Pesapal's guide:
- Create a Pesapal business account.
- Get your Consumer Key and Secret from your welcome email or the API Credentials section.
- Install the Pesapal Payments app from the Shopify App Store and enter your keys.
- Choose M-Pesa (and cards, if you want), turn off Test Mode, then click Activate Pesapal.
- Make a test purchase before telling customers.
Option 3: Connect directly with Daraja (cheapest)
Daraja is Safaricom's own API. Your website sends an M-Pesa Express (STK push) request straight to Safaricom, the customer approves it on their phone, and the money lands in your Till or Paybill instantly.
What it costs: Safaricom doesn't charge a separate fee for the API. You pay your normal M-Pesa business tariff. On a Till, that's free up to KES 500, then 0.55%, capped at KES 200.
What you need to go live, according to a developer guide on DEV Community:
- An active, registered Till or Paybill
- A Daraja account on Safaricom's developer portal
- A sandbox integration tested end to end
- Public HTTPS callback URLs
- A go-live letter on company letterhead, listing your company name, registration number, shortcode, the APIs you want, your callback URLs and contacts
- Your production server's IP addresses whitelisted by Safaricom
The process:
- Build and test in Daraja's sandbox, including STK push and transaction status checks.
- Send your go-live letter to m-pesabusiness@safaricom.co.ke or upload it through the business portal.
- Once approved, swap sandbox keys for production credentials and update your shortcode and URLs.
- Start with small live payments, and log every callback.
Be honest with yourself about maintenance. Your site must handle timeouts, retry failed callbacks, and only mark an order as paid once Safaricom confirms it. If you don't have a developer who'll look after it, a gateway is the safer choice.
Daraja doesn't take cards. Most stores that use it add a gateway like Paystack for card payments.
Option 4: Show your Till number (no integration)
If you get a handful of orders a week, perhaps through Instagram or WhatsApp, you don't need any integration at all.
- Add "Pay with M-Pesa" as a manual payment option at checkout, showing your Till number (or Paybill and the order number as the account).
- Ask customers to enter their M-Pesa confirmation code in the order notes, or send it on WhatsApp.
- Check each payment in your M-Pesa Business App before you ship.
WooCommerce and Shopify both support manual payment methods. It costs only your Till tariff, but it doesn't scale: every order needs checking by hand, and mistakes or fake confirmation messages are a real risk. Never ship on a screenshot alone. Confirm the payment in your own M-Pesa records first.
Tips for a checkout that converts
- Put M-Pesa first if most of your customers pay that way.
- Explain the STK prompt. A line like "You'll get a prompt on your phone; enter your M-Pesa PIN to pay" reduces abandoned payments.
- Give customers time. Prompts time out if they're slow, so offer a "Resend prompt" button.
- Know the limits. M-Pesa caps transactions at KES 250,000 each and KES 500,000 a day. For bigger orders, offer a card or bank transfer too.
Frequently asked questions
What is the easiest way to accept M-Pesa on a website?
Sign up with a payment gateway like Paystack, which charges 1.5% on M-Pesa payments in Kenya, has no setup or monthly fees, and adds M-Pesa to your checkout through plugins or payment links. You don't need your own Till or Paybill to use it.
How much does it cost to accept M-Pesa online?
Through Paystack it's 1.5% per payment. Through Safaricom's Daraja API you pay your normal Till tariff, which since August 2026 is free up to KES 500, then 0.55% capped at KES 200. Flutterwave charges 2.9%, and Pesapal's fees should be confirmed with Pesapal.
Do I need a Till number to accept M-Pesa on my website?
Not if you use a payment gateway like Paystack or Flutterwave, which collect on your behalf. You do need your own Till or Paybill to use Safaricom's Daraja API directly, or to accept manual M-Pesa payments.
Can I accept M-Pesa on Shopify?
Yes, through a third-party payment app. Pesapal offers a Shopify app: you create a Pesapal business account, install the Pesapal Payments app, enter your API keys and turn on M-Pesa. Shopify doesn't offer M-Pesa as a built-in payment option.
What documents do I need for an M-Pesa Till?
Sole traders need a national ID, KRA PIN certificate, county business permit, bank settlement letter and a passport photo. Companies also need a certificate of incorporation and a recent CR12. The trading name must match exactly on all documents.
Sources
Tools mentioned
- Paystack Commerce — African payment infrastructure, payment pages, digital storefronts, and recurring subscription billing.
- WordPress.org — Open-source CMS powering over 40% of the web with local African hosting compatibility.
- Flutterwave Store — Pan-African payments engine, digital invoicing, virtual cards, and seamless multi-currency store.
Related guides
- Best Payment Gateway for Kenyan Online Stores (Paystack, Flutterwave, Pesapal, Daraja) — Paystack, Flutterwave, Pesapal and Safaricom's Daraja API compared for Kenyan online stores: M-Pesa and card fees in shillings, settlement speed, payouts and how much developer work each needs.
- How to Receive USD Payments as a Freelancer in Kenya — The cheapest ways for Kenyan freelancers to get paid in US dollars (Raenest, Grey, Payoneer, PayPal to M-Pesa or a bank USD account), what each costs in shillings, and how to get the money onto M-Pesa.
- How to Pay for ChatGPT Plus and Claude Pro in Kenya — Pay for ChatGPT Plus and Claude Pro from Kenya with M-Pesa GlobalPay, a fintech virtual card, your bank card or Google Play, with real costs including 16% VAT.
- Paying for International Software with M-Pesa in Kenya: What Actually Works — How to use M-Pesa Global Pay virtual cards, local bank rails, and fintech bridges to subscribe to global software directly from your Safaricom balance.