Appearance
Move from the legacy Mookhpay API
The MOOKHPay API is a new API. Your legacy login, requests and callbacks do not work on it. Change your integration to move.
This guide shows what changes and how to change it. The change takes six steps.
The six steps
- Set up your account. Register, create an organisation and create a key.
- Change the create call. Send one request to open a hosted checkout.
- Confirm each payment. Read the checkout before you fulfill.
- Check your payment methods and payouts. Confirm that the platform covers what you sell.
- Test with a small amount. Use your own phone.
- Send live orders to the new API.
Keep your legacy integration running until the new one passes the go-live checklist.
What changes
| Legacy | MOOKHPay | |
|---|---|---|
| Sign in | POST /api/login returns a token | A secret key in the Authorization header. There is no login call |
| Create a payment | POST /api/checkout/init/payment | POST /v1/payments/merchant/checkouts |
| Amount | Whole units | Minor units. Multiply by 100 |
| Currency | You send currency | The host sets it. KES in Kenya and UGX in Uganda |
| Payment method | You send payment_method | The payer chooses on the hosted page |
| Result of a payment | A callback or IPN to your URL | The payer returns to your return_url. You read the checkout with GET |
| Find a payment | By order_number or payment reference | By checkout id |
What is not available
Check this list before you move. If you need an item, keep that part of your business on the legacy gateway.
- USD, RWF and TZS payments. Checkouts are
KESorUGXonly. - Airtel Money, PayPal, Paytota, Bonga and UnionPay.
- Raw card processor payloads (
checkout_mode1). - A callback URL for each order.
- Lookup by order number or by payment reference. A list or search of checkouts.
- A test mode for checkouts made with a secret key. A checkout from a
mkp_test_key charges a real phone. Only a Pay Button test key opens a test checkout, and amkp_test_key makes test direct charges. See Testing. - More than one current key for each organisation. A replaced key keeps working for 24 hours, so you can move to the new key without downtime.
- Bank payouts. See Payments and payouts.
Before you start
- Your legacy email, password and API keys do not work on MOOKHPay.
- You need a phone number in Kenya (
+254) or Uganda (+256). - This guide does not list prices. Ask your Mookh contact for your fees.