Skip to main content
← Back to BlogWeb Development

Shopify vs. WooCommerce vs. Custom Next.js: Which E-Commerce Platform Is Best for M-Pesa?

T
Thierry 9 min read

Kenyan retailers have the same dilemma. They want to sell online. They know M-Pesa is non-negotiable. And they are staring at three options: Shopify, WooCommerce, or a custom build. They have read blog posts written by Americans who have never sent an STK push in their lives. They are confused.I have built e-commerce systems on all three platforms. I have integrated the Safaricom M-Pesa Daraja API more times than I can count. I have watched clients celebrate their first online sale and I have watched others burn money on the wrong platform. This is the honest breakdown I give every Kenyan business owner before we write a single line of code.

M-Pesa Daraja API Compatibility: The Real Story

M-Pesa is not just a payment method in Kenya. It is the payment method. Over 96% of online transactions in Kenya happen via mobile money. If your e-commerce platform cannot handle M-Pesa cleanly, you do not have an e-commerce business. You have a brochure.

Shopify and M-Pesa

Shopify is a Canadian company. Its native payment gateways are Stripe, PayPal, and Shopify Payments. None of these work cleanly for Kenyan shillings and local mobile money.To accept M-Pesa on Shopify, you need a third-party app. Options exist—some Kenyan developers have built Shopify apps that connect to the Daraja API. But here is the reality:

  • These apps cost extra. Some charge monthly fees on top of your Shopify subscription.
  • The checkout flow is clunky. Customers often get redirected away from Shopify to an external page, enter their number, wait for the STK push, then manually confirm payment. Each step is a drop-off point.
  • If the app developer stops maintaining it, your checkout breaks. We have seen this happen.

There is a workaround using Shopify's manual payment methods, where you generate a Paybill or Till number and ask customers to pay offline, then upload a screenshot. That is not e-commerce. That is chaos.

WooCommerce and M-Pesa

WooCommerce runs on WordPress, and because it is open-source, Kenyan developers have built direct M-Pesa integrations. Plugins like WooCommerce M-Pesa by Osen or Lipa na M-Pesa by Kopokopo connect directly to the Daraja API.What works:

  • The customer enters their phone number on the checkout page.
  • The STK push hits their phone automatically.
  • They enter their PIN, and the order confirms instantly.
  • The payment status updates in your WooCommerce dashboard in real time.

What breaks:

  • Plugin conflicts. WooCommerce sites often have twenty plugins running. When one updates, the M-Pesa plugin can break.
  • The Daraja API credentials expire or need renewal. If your developer did not set up proper error logging, payments fail silently and customers blame you.
  • Some plugins store API credentials insecurely. We have audited sites where the consumer key and secret were visible in the page source. That is a security disaster.

WooCommerce can work well with M-Pesa, but only if it is built and maintained by someone who understands both WordPress and the Daraja API.

Custom Next.js and M-Pesa

A custom Next.js (or similar modern framework) build gives you complete control. You own the code. You own the checkout flow. You own the API integration.How we build it at AngazaDesk:

  • We write a custom M-Pesa integration using the official Daraja API.
  • The customer enters their phone number on our custom checkout page.
  • We trigger the STK push via a secure backend server.
  • We handle the callback from Safaricom to confirm payment.
  • We update the order status and send confirmation via SMS or WhatsApp.

The advantages:

  • The checkout flow is exactly what we want. No redirects. No third-party branding. Just your brand, your colors, your process.
  • We handle edge cases. What happens if the STK push times out? What if the user enters a wrong PIN? What if the callback from Safaricom fails? We code for all of it.
  • We integrate with your Till or Paybill directly. We can even route payments to different accounts based on product category if needed.

The downside:

  • You need a developer. Not a WordPress installer. A real developer. This costs more upfront.

Transaction Fees and USD Subscription Costs

This is where Kenyan business owners get shocked. Let me break down the real math.

Shopify Costs

  • Basic Shopify: $29/month (roughly KSh 3,770 at current rates).
  • Shopify Payments: Not available in Kenya. You must use a third-party gateway.
  • Transaction fees: Shopify charges 2% per transaction on top of whatever your payment provider charges. If your M-Pesa app charges 1.5%, you are paying 3.5% total.
  • Apps and themes: Most stores need $10–$50/month in apps. A decent theme can cost $300 once-off.

Real annual cost for a small Kenyan store: KSh 50,000 to KSh 100,000 in subscriptions and fees alone, before you make a single sale. And you are paying in USD, which means your costs go up every time the shilling weakens.

WooCommerce Costs

  • WordPress + WooCommerce: Free.
  • Hosting: You need decent hosting. Shared hosting for KSh 3,000/year will crash during a sale. We recommend managed WordPress hosting at KSh 12,000–KSh 36,000/year for a store doing real volume.
  • SSL certificate: Usually included in good hosting.
  • M-Pesa plugin: Some are free, some cost a one-time fee of KSh 5,000–KSh 15,000.
  • Theme: Free to KSh 15,000 for a premium WooCommerce theme.
  • Transaction fees: You pay only the M-Pesa charges. Usually 1% to 1.5% per transaction. No Shopify double-dip.

Real annual cost: KSh 20,000 to KSh 60,000, depending on hosting and premium plugins.

Custom Next.js Costs

  • Development: KSh 150,000 to KSh 500,000 depending on complexity. A simple catalog with M-Pesa checkout is on the lower end. A multi-vendor marketplace is on the higher end.
  • Hosting: Vercel has a generous free tier for small sites. For production e-commerce, expect KSh 10,000–KSh 30,000/year for hosting and database.
  • Maintenance: KSh 30,000–KSh 60,000/year for updates, security patches, and API changes.
  • Transaction fees: Same as WooCommerce. Just the M-Pesa charges.

Real first-year cost: KSh 200,000 to KSh 600,000.

Mobile Load Speed on 4G/5G Connections

Kenyan shoppers are impatient. We have measured this. If a checkout page takes more than three seconds to load on Safaricom 4G, abandonment rates jump to over 60%.

Shopify Speed

Shopify handles hosting and CDN. Their infrastructure is fast globally. But in Kenya, we have seen Shopify stores load in 4–6 seconds on mobile data. Why? Bloated themes, heavy apps, and unoptimized images. You can fix some of this, but you are locked into their architecture.

WooCommerce Speed

WooCommerce can be fast, but it is usually slow. Most Kenyan WooCommerce sites we audit load in 6–10 seconds on mobile. The culprits:

  • Cheap shared hosting with servers in the US or Europe.
  • Twenty plugins, each loading its own JavaScript.
  • 3MB product images straight from a DSLR camera.
  • Bloated page builders like Elementor with excessive animations.

With proper optimization—good hosting, image compression, caching, and a lightweight theme—WooCommerce can load in under two seconds. But that requires expertise. Most store owners do not have it.

Next.js Speed

Next.js is built for performance. It has automatic image optimization, code splitting, and server-side rendering. A well-built Next.js store loads in under one second on desktop and under two seconds on Safaricom 4G.We built a fashion store for a client in Nairobi using Next.js. Their previous WooCommerce site loaded in 8.4 seconds. The Next.js site loads in 1.2 seconds. Their mobile conversion rate tripled. Not doubled. Tripled.

Custom Checkout Flows: Eliminating Complex 5-Step Forms

The standard WooCommerce checkout is a nightmare on mobile. Seven form fields. Billing address. Shipping address. Account creation. Password. Then payment. Kenyan mobile shoppers do not have the patience.

What We Build Instead

For both WooCommerce (via custom checkout plugins) and Next.js (via custom code), we build one-page or two-step checkouts:

  1. Cart review: Product, quantity, total.
  2. Phone number + M-Pesa: Enter your Safaricom number. Click "Pay Now." STK push arrives. Enter PIN. Done.

No account creation required. No email field if they do not want to give it. No shipping address for digital products. We collect only what we need.For physical products, we use WhatsApp to confirm the delivery address after payment. It sounds informal, but it works. Kenyans trust WhatsApp. We have seen higher completion rates with a "Pay now, confirm details on WhatsApp" flow than with a rigid form that asks for everything upfront.

Our Recommendation Based on Business Size and Budget

After building on all three platforms, here is what I tell clients.

Choose Shopify If...

You are selling digital products or physical goods to an international audience, and M-Pesa is a secondary payment method. Or you have a large budget, you value simplicity over control, and you can absorb the USD subscription costs. If you are targeting diaspora customers with credit cards, Shopify makes sense. For a pure Kenyan market, it is an expensive compromise.

Choose WooCommerce If...

You are a small to medium retailer with a budget under KSh 100,000 for the initial build. You need to launch fast. You have someone who can maintain WordPress updates and plugin conflicts. You want M-Pesa integration without building from scratch. You are willing to invest in good hosting and optimization.WooCommerce is the workhorse of Kenyan e-commerce. It is not perfect, but with the right setup, it works. We have built profitable WooCommerce stores for clients in Mombasa, Nakuru, and Nairobi. The key is not cutting corners on hosting and security.

Choose Custom Next.js If...

You are doing serious volume—KSh 500,000+ in monthly online sales. You want complete control over the customer experience. You want a checkout flow that converts at the highest possible rate. You want a site that loads instantly on mobile. You have the budget for proper development and you see this as a long-term investment, not an experiment.We recommend custom builds for:

  • Established retailers moving online seriously.
  • Brands where user experience is a competitive advantage.
  • Businesses with complex needs: subscriptions, multi-vendor marketplaces, custom logistics integrations.

The Hybrid Approach

Sometimes we combine platforms. We build a custom Next.js frontend for speed and user experience, but connect it to WooCommerce or Shopify on the backend for inventory management. The customer sees a blazing-fast, custom-branded store. The business owner manages products in a familiar dashboard. This costs more, but it gives you the best of both worlds.

Key Takeaway: There is no "best" platform. There is only the right platform for your specific business, budget, and technical capacity. If M-Pesa is your primary payment method, Shopify will fight you. WooCommerce will work if you maintain it. A custom build will dominate if you invest in it. Be honest about where you are today, and build for where you want to be in twelve months.

Share this article

Need help implementing this?

Book a Free Consultation