MAA INVEST Pay Docs
Getting started

Introduction

How MAA INVEST Pay works, and how the sandbox and live environments differ.

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.

  1. Your server sends a signed form to https://maainvest.co.ke/pay/start.php with the order details (the customer's browser posts it, an auto-submitting form works).
  2. The customer lands on the hosted checkout, enters their M-Pesa number and approves the STK prompt on their phone.
  3. Safaricom credits your paybill or till. MAA INVEST confirms the result using your Daraja credentials.
  4. We send a signed webhook to your notify_url. Your server verifies it and marks the order paid.
  5. 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 IDMRT… (e.g. MRT1A2B3C4D)MRC… (e.g. MRC1A2B3C4D)
API secretsk_test_…sk_…
Endpointhttps://maainvest.co.ke/pay/start.php (same for both; the Merchant ID decides the mode)
Real money / M-PesaNeverYes, STK Push to your paybill/till
Needs a paybill, licence, walletNoYes (see Go live)
Outcome of a paymentChosen by the test phone numberDecided by the customer and M-Pesa
Stuck on an integration? Open a ticket from the Support page in your account and include your invoice_id, the time, and the HTTP status you returned.