Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/swmaina/wc-mpesa-tanzania/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
A simple, production-ready WooCommerce payment gateway for accepting Vodacom M-Pesa payments in Tanzania.
Features
- ✅ Vodacom M-Pesa STK Push (Lipa na M-Pesa Online)
- ✅ Real-time payment confirmation via webhooks
- ✅ Secure API key storage (environment variables)
- ✅ Automatic order status updates
- ✅ Customer payment confirmation emails
- ✅ Complete transaction logging
- ✅ Support for both Sandbox and Production
- ✅ Simple, developer-friendly codebase
Requirements
- WordPress 5.0+
- WooCommerce 5.0+
- PHP 7.4+
- Vodacom Developer Account with M-Pesa credentials
Installation
- Download and extract the plugin to
/wp-content/plugins/wc-mpesa-tanzania/ - Activate the plugin in WordPress Admin > Plugins
- Configure credentials in WordPress Admin > WooCommerce > Settings > Payments > M-Pesa (Vodacom - Tanzania)
Configuration
Step 1: Get Vodacom Credentials
- Sign up at Vodacom Developer Portal
- Create a new app to get:
- API Key (Consumer Key)
- API Secret (Consumer Secret)
- Request M-Pesa integration and get:
- Business Shortcode (e.g., 012345)
- M-Pesa Passkey
Step 2: Add Credentials to wp-config.php (Recommended)
For better security, add your credentials to wp-config.php:
// Vodacom M-Pesa Tanzania Configuration
define('WCMPESA_TZ_ENV', 'production'); // or 'sandbox' for testing
// These will be used automatically if saved in WooCommerce settings
// But can also be set here for enhanced securityReleases
1 release.
Tag
Published
v1.0.0
latest
Mar 22, 2026 8mo ago
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.