Accept M-Pesa on your own website, app, WHMCS or WooCommerce. Customers pay on a hosted MAA INVEST checkout by STK Push; the money settles in your own paybill or till, and your server is told by a signed webhook. Build and test everything first in the sandbox (no real money, no paybill needed), then switch to live by changing two values.
- Your server sends a signed form to
https://maainvest.co.ke/pay/start.phpwith the order details (the customer's browser posts it, an auto-submitting form works). - The customer lands on the hosted checkout, enters their M-Pesa number and approves the STK prompt on their phone.
- Safaricom credits your paybill or till. MAA INVEST confirms the result using your Daraja credentials.
- We send a signed webhook to your
notify_url. Your server verifies it and marks the order paid. - The customer is sent back to your
return_url(a thank-you page, not proof of payment).
Accepting payments is free. Fees apply when money is paid out of the platform. A monthly merchant licence may apply to live accounts; the current fee and free trial are shown on the Merchant Gateway page before you register. The sandbox is always free.
Sandbox and live at a glance#
| Sandbox (test) | Live | |
|---|---|---|
| Merchant ID | MRT… (e.g. MRT1A2B3C4D) | MRC… (e.g. MRC1A2B3C4D) |
| API secret | sk_test_… | sk_… |
| Endpoint | https://maainvest.co.ke/pay/start.php (same for both; the Merchant ID decides the mode) | |
| Real money / M-Pesa | Never | Yes, STK Push to your paybill/till |
| Needs a paybill, licence, wallet | No | Yes (see Go live) |
| Outcome of a payment | Chosen by the test phone number | Decided by the customer and M-Pesa |
MAA INVEST Pay Docs