How to Accept M-Pesa and Mobile Money Payments on Your Website in Tanzania
Print- accept mpesa on website, mobile money payments website, online payments tanzania, ecommerce tanzania
- 0
Tanzanian customers pay with M-PESA, Mixx by YAS and Airtel Money every day. If your website only accepts cards, you are turning away most of your buyers. This guide explains how to accept M-Pesa and mobile money payments on your website in Tanzania.
How website mobile money payments work
Your website does not connect to each mobile network separately. Instead, you use a payment gateway (aggregator) that connects to M-PESA, Mixx by YAS, Airtel Money and cards. The customer chooses mobile money at checkout, receives a prompt on their phone, enters their PIN, and the gateway tells your website the payment succeeded.
Step 1: Choose a payment gateway
Several licensed aggregators in Tanzania offer website payments. When comparing, check:
- Which networks and cards are supported.
- Transaction fees and settlement times to your bank account.
- Whether they offer plugins for your platform (WooCommerce, WHMCS, custom PHP).
- The documents they need from your business (registration, TIN and so on).
- Quality of their API documentation and support.
Our own client area uses Selcom to accept M-PESA, Mixx by YAS, Airtel Money and cards.
Step 2: Open a merchant account
Apply with the gateway and complete their business verification. You will receive API credentials (keys) for testing and for live payments.
Step 3: Connect it to your website
- WooCommerce: install the gateway's plugin, enter your keys and test.
- Custom website: a developer integrates the gateway's API: create an order, redirect or push a payment prompt, and handle the confirmation callback.
Step 4: Handle confirmations correctly
The most common mistake is marking an order as paid when the customer returns to the site, instead of when the gateway's confirmation (webhook) arrives. Always rely on the gateway's server-to-server callback, check the amount, and log every callback so problems can be diagnosed.
Step 5: Test with small amounts
Test every network and the card option with small real payments before launch, including failed and cancelled payments.
Step 6: Use HTTPS and good hosting
Payment pages must load over HTTPS, and payment callbacks need a reliable server that is always online. Our hosting plans include free SSL; busy shops may need a VPS.
Want it built for you?
Our website design team builds online shops and booking sites for Tanzanian businesses with mobile money integrated. WhatsApp us to discuss your project.