If your website does not accept M-Pesa, you are losing a significant portion of potential Kenyan customers at the most critical moment which is checkout. Over 90% of Kenyan online transactions involve M-Pesa in some form, and customers who cannot pay via mobile money will abandon their purchase and find a competitor who makes it easier.
Adding M-Pesa payment on a website in Kenya is more straightforward than most business owners expect. You do not need to be a developer, you do not need to apply directly to Safaricom, and you do not need to spend months waiting for API approval. This guide walks you through every option available in 2026 from the simplest manual setup to fully automated STK Push integration so you can choose the approach that fits your business and get your website accepting M-Pesa payments as quickly as possible.
For related reading, see our guides on E-Commerce Website Design in Kenya, How to Start an Online Business in Kenya, and How to Use WhatsApp Business in Kenya. If you need a new WordPress website built with M-Pesa integrated from the ground up, see our WordPress website design services in Kenya.

Why M-Pesa Payment on a Website Is Non-Negotiable in Kenya
Kenya’s e-commerce cart abandonment rate is disproportionately high on websites that only accept card payments. Most Kenyans do not use credit or debit cards for everyday purchases, but virtually every adult Kenyan with a smartphone uses M-Pesa daily. A website that forces card payment is excluding the majority of its potential customers.
M-Pesa STK Push (the automated payment prompt that appears on a customer’s phone at checkout) delivers the smoothest possible experience for Kenyan buyers. The customer enters their phone number, receives a push notification, enters their M-Pesa PIN, and payment is confirmed automatically in under 30 seconds. No manual Paybill numbers, no screenshots, no back-and-forth. Adding M-Pesa payment on a website in Kenya is one of the highest return improvements any Kenyan e-commerce site can make, not because it brings more traffic, but because it lets far more of your existing visitors actually complete a purchase.
Key insight: Businesses that add M-Pesa payment on a website in Kenya consistently report a significant increase in completed orders within the first 30 days, not because they attracted more visitors, but because more of the visitors they already had were able to complete a purchase.
Your Options for Adding M-Pesa Payment on a Website in Kenya
There are three main approaches to setting up M-Pesa payment on a website in Kenya. The right one depends on your technical comfort level, transaction volume, and how automated you need the payment process to be.
| Method | Best For | Technical Difficulty | Cost |
|---|---|---|---|
| Payment Gateway Plugin (Pesapal, DPO Pay, Flutterwave) | Most WordPress and WooCommerce businesses, fully automated STK Push | Low as it requires plugin install and account setup only | 2.5% to 3.5% per transaction, no setup fee |
| Safaricom Daraja API (direct integration) | High-volume businesses wanting full control and lower fees | High as it requires a developer | Free API access; developer cost varies |
| Manual Paybill / Till (customer pays then sends screenshot) | Very small businesses with low order volume as a temporary measure | None | Free, standard M-Pesa transaction fees only |
For the vast majority of Kenyan website owners, a payment gateway plugin is the correct choice. It delivers fully automated M-Pesa STK Push without requiring any coding knowledge, integrates directly with WooCommerce, and handles card payments alongside M-Pesa in the same checkout flow. The rest of this guide focuses on the WordPress approach first, then covers how to add M-Pesa payment on a website in Kenya using other platforms and methods.

The Best Payment Gateways for M-Pesa Payment on a Website in Kenya
Several gateways support M-Pesa payment on a website in Kenya. Here is an honest comparison of the four most widely used in 2026.
Pesapal
The most widely used gateway for M-Pesa payment on a website in Kenya. Supports M-Pesa STK Push, Visa, Mastercard, and Airtel Money in a single checkout. Merchant account approval takes one to three business days. Transaction fees are approximately 3.5% for M-Pesa. The WooCommerce plugin is available free from the WordPress repository and is straightforward to configure.
DPO Pay (formerly 3G Direct Pay)
Preferred for higher transaction volumes and businesses operating across multiple African countries. Supports M-Pesa, Visa, Mastercard, and a wide range of African mobile money platforms. Transaction fees are negotiable above certain monthly volumes. Strong choice for hospitality, travel, and event ticketing businesses in Kenya.
Flutterwave
Best for businesses accepting both local and international payments. Supports M-Pesa alongside extensive African and international payment methods. Transaction fees start at approximately 1% for M-Pesa which is one of the most competitive for high-volume Kenyan businesses. Clean WooCommerce plugin with detailed transaction reporting.
Paystack
Added M-Pesa support for Kenyan businesses in 2024. Charges 1.5% per M-Pesa transaction capped at KES 1,000 which is very competitive for larger orders. User-friendly dashboard and reliable WooCommerce integration make it a strong option for M-Pesa payment on a website in Kenya.
How to Add M-Pesa Payment on a WordPress Website in Kenya Using Pesapal: Step by Step
The following steps use Pesapal as the example since it is the most commonly used gateway for M-Pesa payment on a website in Kenya. The process is broadly similar for other gateways.
Create and verify your Pesapal merchant account
Go to pesapal.com and register as a business merchant. You will need your business registration certificate, KRA PIN certificate, and a copy of your national ID. Pesapal verifies Kenyan business accounts within one to three working days. Once approved, you will receive your Consumer Key and Consumer Secret from your Pesapal dashboard, keep these safe as you will need them during plugin configuration.
Install WooCommerce on your WordPress website
If not already installed, go to Plugins, then Add New, search WooCommerce, Install, then Activate. Complete the setup wizard and set your currency to KES (Kenyan Shilling) and country to Kenya. WooCommerce is free and is the standard e-commerce layer for M-Pesa payment on a website in Kenya built on WordPress.
Install the Pesapal WooCommerce plugin
Go to Plugins, then Add New and search “Pesapal for WooCommerce.” Install and activate it. Navigate to WooCommerce, then Settings, then Payments and click “Set up” next to Pesapal to begin configuration.
Enter your API credentials and configure settings
Paste your Consumer Key and Consumer Secret from your Pesapal dashboard. Set the environment to “Live,” enable M-Pesa STK Push, then copy the IPN URL from the plugin settings and paste it into your Pesapal dashboard under IPN Settings. The IPN URL is what tells your website when a payment is confirmed so orders update automatically.
Test your M-Pesa payment integration
Before going live, place a real test order using your own phone and M-Pesa account. Pay KES 10 to confirm the STK Push prompt appears on your phone, the payment processes, and your WooCommerce order status updates automatically to “Processing.” Testing M-Pesa payment on a website in Kenya before launch takes two minutes and saves hours of customer service issues later.
Important: Always test M-Pesa payment on a website in Kenya with a real transaction before directing customers to your checkout. The most common issue is an incorrectly configured IPN URL, which causes orders to remain stuck on “Pending” even after payment. A two-minute test payment saves hours of customer service problems later.
Other Ways to Add M-Pesa Payment on a Website in Kenya
WordPress and WooCommerce is the most common setup for Kenyan business websites, but not every website is built on WordPress. Here is how to add M-Pesa payment on a website in Kenya if you are using a different platform or a custom-built site.
Shopify
Shopify does not natively support M-Pesa, but you can accept M-Pesa payment on a Shopify website in Kenya through third-party payment gateway integrations. Pesapal and DPO Pay both offer Shopify-compatible integration. The setup involves installing the gateway’s Shopify app from the Shopify App Store, creating your merchant account, and configuring your API credentials under Shopify Settings, then Payments, then Third-party providers. Once active, M-Pesa STK Push appears as a payment option at your Shopify checkout alongside card payments.
Custom-built websites (HTML, PHP, or other frameworks)
If your website was built by a developer using HTML, PHP, Laravel, or another framework, the most reliable way to add M-Pesa payment on a website in Kenya is through the Safaricom Daraja API directly. Your developer applies for API access at developer.safaricom.co.ke, creates a sandbox app for testing, and integrates the STK Push endpoint into your site’s checkout flow. Alternatively, payment gateways like Pesapal and Flutterwave offer REST API documentation and SDKs that your developer can use to integrate M-Pesa without dealing directly with Safaricom’s API, which is often faster and simpler for smaller projects.
Wix and Squarespace
Wix and Squarespace have limited support for African payment gateways, which is one of the key reasons they are not recommended for Kenyan business websites that need to accept M-Pesa. Wix supports Pesapal through its payment settings on some plans, but coverage is inconsistent and support is limited. Squarespace does not support M-Pesa at all. If you are currently on Wix or Squarespace and struggling to accept M-Pesa payment on your website in Kenya, migrating to a WordPress website is the most practical long-term solution and gives you full access to every gateway covered in this guide.
Standalone payment links (no website required)
If you do not yet have a website but need to accept M-Pesa payment online in Kenya, both Pesapal and Flutterwave offer hosted payment links. You generate a payment link from your gateway dashboard, set the amount and description, and share it directly via WhatsApp, email, or social media. The customer clicks the link, lands on a secure hosted payment page, and pays via M-Pesa STK Push or card. This is a practical starting point for businesses building their online presence, though it does not replace a professional website for building long-term trust and search visibility.
Booking and appointment systems
Service businesses using online booking tools such as Calendly, Acuity Scheduling, or dedicated Kenyan booking platforms can accept M-Pesa payment on their website in Kenya by embedding a Pesapal or DPO Pay payment page into their booking confirmation flow. Several Kenyan-built booking systems including BookVia and Reserveport have native M-Pesa integration. For WordPress websites using booking plugins such as Amelia or WooCommerce Bookings, the same Pesapal or Flutterwave gateway used for your main site handles M-Pesa payments at the booking checkout automatically.
Real Result: How a Kilimani Fashion Boutique Reduced Cart Abandonment by 68% After Adding M-Pesa Payment on Their Website
Client: Online fashion boutique, Kilimani, Nairobi
This client came to us with a WordPress WooCommerce website that had been live for eight months but was generating very few completed orders despite consistent traffic from Instagram. Their checkout only accepted Visa and Mastercard. An audit of their Google Analytics showed a cart abandonment rate of 84%, meaning 84 out of every 100 customers who added items to their cart were leaving without buying.
We integrated Pesapal M-Pesa STK Push, added Airtel Money as a secondary option, and updated the checkout page to display payment method icons prominently above the fold. We also added a brief “How to pay with M-Pesa” tooltip on the checkout page for first time buyers. Total implementation time was four hours.
Within 30 days of adding M-Pesa payment on their website in Kenya, completed orders increased by 340%. Seventy-eight percent of all orders were paid via M-Pesa STK Push. The same number of visitors were arriving but now the vast majority could complete a purchase. Results vary by traffic, product, and pricing, but for any Kenyan website currently accepting card-only payments, M-Pesa integration is the single highest impact change you can make.

Common M-Pesa Website Integration Mistakes in Kenya
| Mistake | Why it hurts you | How to fix it |
|---|---|---|
| Using sandbox credentials in live environment | Payments appear to process but no money is collected; orders stay pending | Switch plugin environment setting to “Live” and use production API credentials |
| Incorrect or missing IPN URL | Orders do not update after payment; customers think their payment failed and contact you in panic | Copy the exact IPN URL from your plugin settings and paste it into your payment gateway dashboard |
| Currency not set to KES | M-Pesa STK Push sends incorrect amounts; payments fail or customers are overcharged | Set WooCommerce currency to KES under WooCommerce, then Settings, then General |
| No test transaction before going live | First real customer payment fails and you have no idea why until it is too late | Always process a KES 10 test payment through your own phone before launching |
| Offering manual Paybill only | Customers must leave your site, open M-Pesa, enter details manually, then send a screenshot making most abandon | Upgrade to STK Push via a payment gateway for a fully automated checkout experience |
| Not displaying M-Pesa logo at checkout | Kenyan customers do not realise M-Pesa is available and default to assuming card-only | Enable payment method icons in your WooCommerce checkout settings; add M-Pesa logo above the fold |
Need Help Adding M-Pesa Payment on a Website in Kenya?
Integrating M-Pesa payment on a website in Kenya is straightforward when you know what you are doing, but small configuration errors like a wrong IPN URL, sandbox credentials left active, or a currency mismatch can cause payment failures that frustrate both you and your customers.
At J&M Digital Solutions, we integrate M-Pesa payment on websites in Kenya as a standard part of our WordPress website design service. Whether you need M-Pesa added to an existing website or want a new WooCommerce site with M-Pesa payment on a website in Kenya configured from day one, we handle complete setup, testing, and handover.
- Full M-Pesa STK Push integration via Pesapal, DPO Pay, Flutterwave, or Paystack
- WooCommerce setup configured for M-Pesa payment on a website in Kenya with KES currency and local tax settings
- IPN configuration and payment flow testing before handover
- Card payment integration alongside M-Pesa for maximum checkout coverage
- Checkout page optimisation to reduce cart abandonment for Kenyan buyers
- Ongoing support for payment issues, gateway updates, and plugin conflicts
Need M-Pesa Integrated on Your Website in Kenya?
J&M Digital Solutions handles complete M-Pesa payment integration for Kenyan websites, from gateway account setup to live payment testing. Stop losing customers at checkout. Get your website accepting M-Pesa today.
Phone / WhatsApp: +254 769 604 780
Website: jmdigitalsolutionske.com
Service area: Serving businesses across Kenya
Frequently Asked Questions
Do I need a Safaricom Paybill to add M-Pesa payment on a website in Kenya?
Not necessarily. Payment gateways like Pesapal and Flutterwave process M-Pesa through their own registered Paybill and settle funds to your bank account. For most Kenyan websites, a gateway account is all you need as it is faster to set up than applying directly to Safaricom.
How long does it take to add M-Pesa payment on a website in Kenya?
The technical integration takes two to four hours. Gateway merchant account approval takes one to three business days. Total: three to five business days from starting your application to having live M-Pesa payments active on your website.
Which is the best payment gateway for M-Pesa payment on a website in Kenya?
Pesapal is the best starting point for most Kenyan businesses as it has established local presence, reliable WooCommerce plugin, and straightforward approval. Flutterwave and Paystack offer lower fees for higher volumes. DPO Pay is strongest for hospitality and multi-country businesses.
Can I add M-Pesa payment on a website in Kenya that is not using WooCommerce?
Yes. Most gateways offer hosted payment page solutions for websites without WooCommerce which are ideal for service businesses, consultants, and event ticketing sites. Shopify, custom PHP sites, and booking platforms all support M-Pesa through gateway integrations. You can also use standalone payment links from Pesapal or Flutterwave if you do not yet have a website.
How much does it cost to accept M-Pesa payment on a website in Kenya?
No monthly fees as you pay per transaction only. Pesapal charges approximately 3.5%, Paystack 1.5% capped at KES 1,000, and Flutterwave approximately 1% per M-Pesa transaction. On a KES 5,000 order: Pesapal KES 175, Paystack KES 75, Flutterwave KES 50. Factor these into your pricing from the start.
