Overview
The cwhost M-Pesa WooCommerce Plugin allows online stores to accept Safaricom M-Pesa STK Push payments directly on checkout. Customers receive a payment prompt on their phone and complete payment instantly.
Key Features
-
✔ STK Push (Lipa na M-Pesa Online)
-
✔ Automatic order confirmation
-
✔ Real-time payment status updates
-
✔ Secure Daraja API integration
-
✔ Works with both test and live credentials
-
✔ Optimized for Kenyan businesses
Requirements
-
WordPress + WooCommerce installed
-
Safaricom Daraja API credentials
-
SSL certificate (HTTPS enabled)
-
PHP 7.4 or higher
Installation Steps
-
Log in to your WordPress admin dashboard.
-
Go to Plugins → Add New → Upload Plugin.
-
Upload the cwhost M-Pesa WooCommerce Plugin ZIP file.
-
Click Install then Activate.
-
Navigate to WooCommerce → Settings → Payments.
-
Enable M-Pesa (STK Push).
-
Enter your Daraja API credentials.
-
Save changes.
How It Works
-
Customer places an order.
-
Enters their M-Pesa phone number at checkout.
-
Receives an STK prompt on their phone.
-
Enters M-Pesa PIN.
-
Order status updates automatically to Processing / Completed.
Troubleshooting
-
Ensure phone numbers start with
07XXXXXXXX -
Confirm site is served over HTTPS
-
Verify callback URL is publicly accessible