New
Ecommerce Mobile App
React Native Expo app for Botble Ecommerce - 50+ screens, dark mode, RTL support
M-Pesa Payment Gateway
Plugin
by Motion Media
•
(1)
Secure M-Pesa STK Push integration with real-time status polling.
$20.00
$40.00
Purchase Links
* You can purchase the plugin directly from either of the links below:
* 👉 https://paystack.shop/motion-media-kenya 👉 (KSH)
* 👉 https://paystack.shop/motion-media-storefront 👉 (USD)
Demo for Testing
You can test the plugin using our demo store here:
👉 https://erp.motionmedia.co.ke/
Simply add any product to the cart and, during checkout, select “Pay online via M-Pesa” to see how the plugin works on the storefront.
M-Pesa Payment Gateway (STK Push & Real-Time Verification)
- Category: Payments / Ecommerce
- Version: 1.0.0
🚀 Overview
- Automate your payments in Kenya with the ultimate M-Pesa integration for Botble CMS.
- Stop asking customers to send screenshots of payments. This plugin integrates directly with Safaricom's Daraja API to provide a seamless, automated checkout experience. It triggers an STK Push (M-Pesa Express) to the customer's phone and listens for payment confirmation in Real-Time.
- Unlike basic wrappers, this plugin includes a Smart Waiting Room that holds the customer's session, checks transaction status instantly, and redirects them to the success page the moment the PIN is entered—just like Uber or Jumia.
🔥 Key Features
1. Seamless STK Push (M-Pesa Express)
- Automatically detects the customer's phone number.
- Smart Number Formatting: Automatically fixes formats (converts 07xx, 01xx, or +254 to the required format).
- Triggers the M-Pesa PIN prompt immediately upon checkout.
2. 🟢 Real-Time Status Polling (The "Waiting Room")
- No Refresh Needed: The checkout page automatically detects when payment is completed.
* Instant Feedback:
- Success: Redirects to Order Receipt immediately.
- Failure: Shows specific, human-friendly error messages (e.g., "Wrong PIN entered", "Insufficient Funds", "User Cancelled").
- Timeout: Handles cases where the user takes too long to reply.
3. 🛡️ Robust Transaction Recovery (Admin Re-Query)
- Never lose an order: If a callback is missed (due to internet issues or server downtime), the order is not lost.
- One-Click Verification: Includes a "Re-query Safaricom" button in the Admin Order details. You can manually ask Safaricom if a transaction exists, and the system will auto-complete the order if paid.
4. 📦 Smart Order Management
- Automatically moves orders from "Incomplete" to "Processing" upon successful payment.
- Records the official M-Pesa Receipt Number (e.g., TLA83...) directly into the transaction logs for easy reconciliation.
5. 🔒 Enterprise-Grade Security
- Plug-and-Play CSRF Handling: No need to edit core system files.
- Token Caching: Implements smart caching for Auth Tokens to prevent firewall blocking (Incapsula) by Safaricom during high-traffic periods.
- Secure Storage: API Credentials are encrypted in the database, not hardcoded in files.
📸 Screenshots
- Checkout: User enters phone number.
- The Waiting Room: Clean UI with spinner and countdown.
- Admin Settings: Native Botble UI for API keys.
- Transaction Details: Showing the "Re-query" button and M-Pesa Receipt code.
⚙️ Requirements
- Botble CMS (Ecommerce Module enabled).
- SSL Certificate: Your site must be accessible via https:// (Safaricom requirement).
- Daraja Account: Consumer Key, Secret, and Passkey from the Safaricom Developer Portal.
🛠️ Installation & Setup
- Upload the plugin zip file in Plugins > Add New.
- Activate "M-Pesa Payment Gateway".
- Go to Payments > Payment Methods and toggle M-Pesa ON.
- Enter your Consumer Key, Secret, Passkey, and Shortcode.
- Select Production (Live) or Sandbox (Test).
- Save settings. The system automatically handles the rest!
Ready to accept M-Pesa payments professionally? Install today!
Leave a comment
Your email address will not be published. Required fields are marked *
Kindly log in to share your feedback on this plugin.
Can we build a payment plugin for payscribe.co you can reach me on Whatsapp 09025398760
Sure, why not, will do