For WooCommerce, use a payment gateway plugin from a Tanzanian aggregator like Selcom, Azampay, or Pesapal. These plugins add M-Pesa, Tigo Pesa, and Airtel Money as checkout options. For Shopify, you need a Shopify-compatible payment provider that supports Tanzanian mobile money; Pesapal offers Shopify integration, and some aggregators provide custom integration options. If no existing plugin meets your needs, a developer can build a custom WooCommerce payment gateway that connects to any aggregator API. Custom Shopify payment apps require Shopify Plus or the Payments Apps API.
WooCommerce and Shopify are built for card payments. Their default checkout flows expect a credit card number, expiry date, and CVV. This works for North American and European markets. It does not work for Tanzania, where the majority of digital transactions happen through mobile money.
The result: many Tanzanian businesses set up a WooCommerce or Shopify store, install a nice theme, add their products, and then realize their customers have no way to pay. The built-in payment gateways (Stripe, PayPal, Shopify Payments) do not support M-Pesa, Tigo Pesa, or Airtel Money.
Solving this requires a payment gateway that connects your store to Tanzanian mobile money rails. On WooCommerce, this means a plugin. On Shopify, it means a compatible payment provider or a custom payment app. Both approaches connect your store to an aggregator (Selcom, Azampay, ClickPesa, or Pesapal) that handles the actual mobile money transactions.
WooCommerce (WordPress) is the more flexible option for Tanzanian mobile money. You have three paths:
Several Tanzanian aggregators offer WooCommerce plugins:
The aggregator plugin approach is the fastest. Install, configure, test, and go live. The plugin handles the payment flow, callbacks, and order status updates.
WooCommerce allows custom payment gateways through its WC_Payment_Gateway class. You write a PHP plugin that extends this class, connects to any aggregator API you choose, and handles the payment flow. This gives you full control over the checkout experience.
Building a custom gateway requires PHP skills and understanding of the WooCommerce payment gateway API. The mobile money logic is the same as any integration: send a payment request, handle the callback, update the order status.
Some aggregators offer hosted payment pages. The customer is redirected from your WooCommerce checkout to the aggregator's payment page, completes the payment there, and is redirected back to your store. This requires minimal custom code but takes the customer off your site during payment.
Get weekly developer tips
Join 25,000+ developers. Practical guides, job tips, and new content — straight to your inbox.
No spam. Unsubscribe anytime.
Shopify is more locked down than WooCommerce when it comes to custom payment gateways. You cannot simply install a PHP plugin. Shopify controls the checkout experience.
Your options:
Pesapal is available as a payment provider on Shopify in East Africa. If Pesapal supports your needs, this is the simplest path: enable Pesapal in your Shopify payment settings, configure your API credentials, and mobile money appears at checkout.
Check the Shopify Payments directory for other providers that support Tanzanian mobile money. The available options change as aggregators add Shopify support.
Shopify's Payments Apps API allows developers to build custom payment integrations. This is an API-based approach where you build an app that connects Shopify's checkout to your aggregator of choice. It requires development skills and access to the Payments Apps API, which has specific requirements.
The low-tech workaround: display mobile money payment instructions at checkout ("Send TZS X to Paybill Y with reference Z"), and manually confirm payments. This works for very low volume but does not scale and creates friction for customers.
If Shopify's payment limitations are a dealbreaker, consider whether a custom-built e-commerce site with mobile money baked into the checkout might serve you better. A React + Node.js store with a direct aggregator integration gives you complete control. Our e-commerce checkout guide covers this approach.
Both WooCommerce and Shopify expect payment to resolve during the checkout flow: the customer clicks "Pay," the payment processes, and the order is confirmed. Mobile money breaks this expectation because the payment requires the customer to confirm on their phone, which takes 10 to 60 seconds.
A good mobile money plugin must handle this:
Not all plugins handle this well. Some redirect the customer to a "thank you" page immediately and only update the order status when the callback arrives later. This creates confusion: the customer sees "Order received" but the payment has not been confirmed. Test any plugin thoroughly before going live.
If you are starting a new Tanzanian e-commerce store and mobile money is your primary payment method, here is the honest comparison:
WooCommerce is better for mobile money flexibility. You have more plugin options, you can build a custom gateway, and you have full control over the checkout experience. The tradeoff: WooCommerce requires WordPress hosting, more maintenance, and more technical skill to run.
Shopify is easier to manage but more restrictive on payments. The platform handles hosting, security, and performance. The tradeoff: you are limited to Shopify-compatible payment providers, and custom payment integrations require more advanced development.
For a Tanzanian store where mobile money is the primary (or only) payment method, WooCommerce typically gives you more options. For a store where mobile money is one of several payment methods and you value platform simplicity, Shopify with Pesapal is a valid choice.
A third option: build a custom store. If you or your developer can build a React + Node.js application with a direct aggregator integration, you get complete control over the checkout, the payment flow, and the customer experience. This is more work upfront but eliminates the limitations of both WooCommerce and Shopify. McTaba's Full-Stack course (KES 120,000 / ~TZS 2,400,000) teaches you how to build this from scratch.
If you are adding mobile money to an existing WooCommerce or Shopify store:
If you need a custom gateway built, the M-Pesa Integration course (KES 9,999 / ~TZS 200,000) at McTaba Academy teaches the payment integration pattern. The PHP/WooCommerce adaptation uses the same architecture you learn in the course, applied to WooCommerce's gateway framework.
Create a free McTaba Academy account. Access starter lessons, join the community, and explore at your own pace.
Create Free Account