mpesa website integration kenya

M-Pesa Website Integration Kenya: How to Accept M-Pesa Payments on Your Site

Why M-Pesa Integration Is Non-Negotiable for Kenyan E-commerce

Over 80% of digital transactions in Kenya happen via M-Pesa. If your website doesn’t accept M-Pesa, you are turning away the majority of your potential customers at checkout. Card penetration in Kenya remains low β€” M-Pesa is the default payment method for most Kenyan consumers and an increasing number of businesses. Building a website without M-Pesa integration in Kenya is like building a shop without a cash register.

Your Options for M-Pesa Website Integration

Option 1: Daraja API (Safaricom’s Direct API)

The Daraja API is Safaricom’s developer portal that gives you direct access to M-Pesa’s STK Push (Lipa Na M-Pesa), C2B (customer to business), B2C, and other services. It’s the most powerful integration but requires a developer and a registered business with Safaricom.

Best for: Custom websites and apps that need full control over payment flows.

Requirements: Business registration, Safaricom M-Pesa API access application, developer resources.

Cost: Free API access, but requires developer time to integrate (typically KES 25,000–60,000 for implementation).

Option 2: Payment Gateways (Easiest Route)

Several Kenyan payment gateways handle the Safaricom API complexity for you and provide ready-made plugins or APIs that connect directly to your website:

  • Pesapal β€” accepts M-Pesa, Visa, Mastercard. Has a WooCommerce plugin. Popular for e-commerce sites.
  • iPay Africa β€” M-Pesa, Airtel Money, card payments. WooCommerce and custom integration available.
  • Kopokopo (DPO Group) β€” good for businesses with high transaction volumes.
  • Flutterwave β€” pan-African gateway supporting M-Pesa and multiple currencies.

Best for: WooCommerce sites, e-commerce, or any site needing quick integration without custom development.

Cost: Transaction fees typically 2–3.5% per transaction. Some have monthly fees.

Option 3: M-Pesa Till or Paybill (Simplest)

For businesses not running full e-commerce β€” service businesses, consultants, agencies β€” a Buy Goods Till or Paybill number paired with a manual confirmation process is often sufficient. Customers pay to your Till, send a screenshot or STK confirmation, and you confirm manually.

Best for: Service businesses, agencies, schools, and anyone with lower transaction volumes.

Cost: Till number registration via Safaricom approximately KES 1,000–2,000. No per-transaction fee for Buy Goods.

M-Pesa Integration for WordPress / WooCommerce

If your website runs on WordPress with WooCommerce, the fastest route is a payment gateway plugin. Pesapal and iPay Africa both have official WooCommerce plugins that take under an hour to configure once your gateway account is active. This is the route we recommend for most Kenyan e-commerce sites β€” it handles M-Pesa, Airtel Money, and cards in a single integration.

What You Need Before Integrating M-Pesa

  • Registered business (sole proprietorship, company, or NGO)
  • KRA PIN
  • Safaricom M-Pesa registered business line
  • Payment gateway account (if using a gateway)
  • SSL certificate on your website (required for all payment integrations)

How Long Does M-Pesa Integration Take?

Using a payment gateway plugin on WooCommerce: 1–3 days once gateway account is approved. Custom Daraja API integration: 1–3 weeks depending on complexity. Safaricom gateway approval: typically 3–7 business days after application.

Does Metridata Handle M-Pesa Integration?

Yes. We integrate M-Pesa into WordPress sites, custom websites, and landing pages. We handle the payment gateway setup, WooCommerce configuration, testing, and go-live. M-Pesa integration is included in our e-commerce website package and available as a standalone service for existing sites.

Book a Free Strategy Call | WhatsApp: +254 792 672500

Subscribe to the newsletter below and get Sangwen’s weekly updates on digital transformation trends, tricks, and tactics.

Leave a Reply

Your email address will not be published. Required fields are marked *

Other Latest Posts

Client Login

×