M-Pesa Payment Gateway New
Accept M-Pesa directly at checkout. The Directorist M-Pesa Payment Gateway connects straight to Safaricom's Daraja API, sending buyers a real STK Push prompt on their phone for one-time payments, and collecting subscription renewals automatically through Ratiba standing orders. Sandbox mode is built in, so you can test the entire flow before a single real payment goes through.
SAVE BIG by Unlocking All Premium Themes & Extensions
Product Overview
If your directory serves buyers in Africa, Stripe and PayPal don't solve the problem you actually have. Most buyers there don't pay with a card, they pay with M-Pesa, and every checkout page that only offers card gateways is a page some of your buyers quietly leave. Directorist M-Pesa Payment Gateway adds M-Pesa as a native payment method inside Directorist checkout, the same way Stripe or PayPal work today. It talks directly to Safaricom's Daraja API, so a buyer's payment is confirmed and their order marked paid automatically, without you checking a bank statement or approving anything by hand.
Real Checkout, Not a Workaround
At checkout, a buyer selects M-Pesa and enters their Safaricom number. Directorist sends an STK Push request straight to their phone, and they confirm the payment with their M-Pesa PIN. The moment Safaricom confirms it, Directorist marks the order paid on its own. No manual bank transfer to reconcile, no waiting to approve a listing until you've checked your account by hand.
Recurring Payments Without Manual Chasing
Ratiba Handles Renewals So You Don't Have To
If you sell subscription listings through Directorist Pricing Plans, this gateway supports Safaricom's Ratiba standing orders. The buyer authorizes it once, the same way as a normal STK Push, and Safaricom collects every renewal automatically after that, on the plan's own schedule, daily, weekly, monthly, or yearly. No re-invoicing a buyer every renewal period, no manually tracking who's paid and who hasn't.
Test Safely Before Going Live
Sandbox Mode is on by default, so you can connect a Daraja sandbox app, run test payments end to end, and confirm everything works before you ever touch real money. Live and sandbox credentials are kept as separate fields, so switching to production is a single toggle, not a re-entry of every setting.
Key Features
- STK Push checkout Buyers pay with a real-time M-Pesa prompt sent to their phone at checkout.
- Ratiba recurring collections Subscription renewals are collected automatically once a buyer approves the initial payment.
- Sandbox and Live modes Test with Safaricom's sandbox environment, then switch to live credentials without losing your settings.
- PayBill and Till support Works with either a PayBill business number or a Buy Goods till number.
- Automatic order reconciliation Orders are marked paid the moment Safaricom confirms payment, with no manual bank checking.
- Built-in connection test Verify your Daraja credentials against Safaricom directly from the settings page, before going live.
- Works with Directorist Pricing Plans Recurring plan payments are supported out of the box when Pricing Plans is active.
Key Benefits
- Fewer abandoned checkouts from buyers who don't use cards
- No manual bank transfer reconciliation
- Automatic subscription renewals, no re-invoicing
- Safe, risk-free testing before accepting real payments
- Faster order approval, since payment confirmation is automatic
- One gateway for both one-time and recurring M-Pesa payments
Frequently Asked Questions
Yes. You choose Shortcode Type in the gateway settings, PayBill for a CustomerPayBillOnline setup, or Till for a CustomerBuyGoodsOnline setup, and the gateway sends the matching transaction type to Safaricom.
Yes. Sandbox Mode is on by default and uses a separate set of credentials from your live setup, so you can run the entire STK Push flow safely before switching to production.
Yes. You need a Daraja app with a Consumer Key, Consumer Secret, Shortcode or Till number, and Passkey, for both sandbox testing and live payments.
No. One-time payments work with the core Directorist checkout on their own. Directorist Pricing Plans is only required if you want recurring plan payments collected automatically through Ratiba.
A background check runs every 15 minutes and queries Safaricom directly for the status of any still-pending M-Pesa orders, so a delayed or missed callback doesn't leave an order stuck as pending.