Accept Mobile Money on WooCommerce with the DGateway Plugin
DGateway is a unified payment and commerce platform for Africa that lets businesses accept mobile money (MTN, Airtel) and card payments through a single integration. Its WordPress plugin brings these payment methods directly to your WooCommerce checkout.
WooCommerce powers millions of online stores worldwide, including a growing number in East Africa. But out of the box, WooCommerce does not support mobile money — the dominant payment method in the region. The DGateway WordPress plugin changes that.
In this guide, you will install the plugin, configure it, test your checkout flow, and go live. By the end, your WooCommerce store will accept MTN Mobile Money, Airtel Money, and card payments.
Why You Need This
If you run a WooCommerce store targeting customers in Uganda, Kenya, Tanzania, or Rwanda, you already know the challenge. Your customers want to pay with mobile money. But WooCommerce's built-in payment options are designed for card-based markets.
You could build a custom integration from scratch, but that means writing code to handle payment initiation, callback processing, order status updates, and error handling. The DGateway plugin does all of this for you in a few clicks.
Prerequisites
Before you begin, ensure you have:
- A WordPress site with WooCommerce installed and activated.
- A DGateway account. Sign up at dgateway.io if you do not have one.
- Your DGateway API keys (both test and live). Find these under Settings > API Keys in your DGateway dashboard.
- WordPress admin access.
Step 1: Install the Plugin
There are two ways to install the DGateway plugin.
Option A: Install from WordPress Plugin Directory
- Log in to your WordPress admin dashboard.
- Navigate to Plugins > Add New.
- Search for "DGateway" in the search bar.
- Find the "DGateway Payment Gateway for WooCommerce" plugin and click Install Now.
- Once installed, click Activate.
Option B: Upload Manually
- Download the plugin ZIP file from the DGateway website or your DGateway dashboard.
- In your WordPress admin, go to Plugins > Add New > Upload Plugin.
- Choose the ZIP file and click Install Now.
- Click Activate after installation completes.
Step 2: Configure the Plugin
With the plugin activated, configure it to connect to your DGateway account.
- Navigate to WooCommerce > Settings > Payments.
- You will see "DGateway" listed as a payment method. Click Manage (or Set up).
- Configure the following settings:
General Settings
- Enable/Disable — Toggle to enable DGateway as a payment option on your checkout page.
- Title — The payment method name displayed to customers. Default is "Mobile Money / Card Payment." You can customize this to something like "Pay with Mobile Money" or "MTN / Airtel Money."
- Description — A brief description shown on the checkout page. For example: "Pay securely using MTN Mobile Money, Airtel Money, or your debit/credit card."
API Credentials
- Test Mode — Enable this during setup and testing. When test mode is on, no real money is charged.
- Test Secret Key — Paste your test secret key from the DGateway dashboard.
- Test Public Key — Paste your test public key.
- Live Secret Key — Paste your live secret key (used when test mode is off).
- Live Public Key — Paste your live public key.
Payment Options
- Accepted Methods — Choose which payment methods to offer. Options typically include MTN Mobile Money, Airtel Money, and Card Payments. Enable the ones relevant to your market.
- Default Currency — Set to match your WooCommerce store currency. DGateway supports UGX, KES, TZS, RWF, and USD.
Webhook Configuration
The plugin automatically registers a webhook URL with DGateway. You can find this URL in the plugin settings — it will look something like:
https://yourstore.com/?wc-api=dgateway_webhook
Make sure this URL is accessible from the internet. If you are testing locally, you will need a tool like ngrok to expose your local server.
- Click Save Changes.
Step 3: Test Your Checkout
Before accepting real payments, test the entire flow.
- Ensure Test Mode is enabled in the plugin settings.
- Add a product to your cart on your store's frontend.
- Proceed to checkout.
- You should see DGateway listed as a payment option. Select it.
- Enter a test phone number. DGateway's test mode accepts specific numbers for simulating different outcomes:
256700000001— Simulates a successful payment256700000002— Simulates a failed payment256700000003— Simulates a timeout
- Click Place Order.
After placing the order, you will see a "waiting for payment confirmation" screen. In test mode, the payment will automatically complete after a few seconds.
Check your WooCommerce orders to verify:
- The order status changed to Processing (for successful payments) or Failed (for failed payments).
- The order notes include the DGateway transaction ID.
- The payment method is recorded as DGateway.
Troubleshooting Test Mode
If the test payment does not complete:
- Check your API keys. Make sure you are using test keys, not live keys.
- Verify the webhook URL. Go to your DGateway dashboard and check that webhooks are being sent and received. Look for any failed deliveries.
- Check WordPress logs. Enable WP_DEBUG in your
wp-config.phpto see any error messages from the plugin. - Ensure WooCommerce is up to date. The plugin requires WooCommerce 5.0 or later.
Step 4: Go Live
Once you are satisfied that everything works in test mode:
- Go to WooCommerce > Settings > Payments > DGateway.
- Disable Test Mode.
- Verify that your live API keys are entered correctly.
- Click Save Changes.
Your store is now accepting real mobile money and card payments.
Post-Launch Checklist
After going live, verify the following:
- Make a small real purchase. Pay with your own mobile money account to confirm the full flow works with real money.
- Check settlement. Log in to your DGateway dashboard and verify that the payment appears in your transactions and that settlement is configured correctly.
- Monitor the first few days. Watch for failed payments, webhook delivery issues, or customer complaints. Address any issues promptly.
- Set up notifications. Configure email or SMS alerts in your DGateway dashboard for transaction events.
Customizing the Checkout Experience
The DGateway plugin integrates with WooCommerce's standard checkout flow, which means it works with most WooCommerce-compatible themes. However, you can further customize the experience:
Custom Checkout Fields
The plugin adds a phone number field to the checkout form for mobile money payments. You can customize the field label and placeholder text in the plugin settings.
Order Status Mapping
By default, successful payments set the order status to "Processing." You can change this mapping in the plugin settings if your workflow requires a different status.
Email Notifications
WooCommerce's built-in email notifications work with DGateway payments. Customers receive order confirmation emails when payment is successful, and you receive new order notifications.
Frequently Asked Questions
Does the plugin work with block-based checkout? Yes, the DGateway plugin supports both the classic and block-based WooCommerce checkout.
Can I accept payments in multiple currencies? Yes, as long as your WooCommerce store supports multiple currencies. The plugin sends the order currency to DGateway, which handles the processing.
What happens if a customer's payment times out? The order is placed in a "Pending Payment" status. If the customer completes the payment later (within the timeout window), the webhook updates the order automatically.
Is the plugin free? The plugin itself is free. You only pay DGateway's standard transaction fees on successful payments.
Start Selling Today
The DGateway WooCommerce plugin bridges the gap between WordPress and mobile money. In less than fifteen minutes, you can transform your WooCommerce store into a fully functional e-commerce platform that accepts the payment methods your East African customers actually use.
Install the plugin, configure your keys, test your checkout, and start selling. It is that straightforward.