Skip to content

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 ​

  1. Set up your account. Register, create an organisation and create a key.
  2. Change the create call. Send one request to open a hosted checkout.
  3. Confirm each payment. Read the checkout before you fulfill.
  4. Check your payment methods and payouts. Confirm that the platform covers what you sell.
  5. Test with a small amount. Use your own phone.
  6. Send live orders to the new API.

Keep your legacy integration running until the new one passes the go-live checklist.

What changes ​

LegacyMOOKHPay
Sign inPOST /api/login returns a tokenA secret key in the Authorization header. There is no login call
Create a paymentPOST /api/checkout/init/paymentPOST /v1/payments/merchant/checkouts
AmountWhole unitsMinor units. Multiply by 100
CurrencyYou send currencyThe host sets it. KES in Kenya and UGX in Uganda
Payment methodYou send payment_methodThe payer chooses on the hosted page
Result of a paymentA callback or IPN to your URLThe payer returns to your return_url. You read the checkout with GET
Find a paymentBy order_number or payment referenceBy 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 KES or UGX only.
  • Airtel Money, PayPal, Paytota, Bonga and UnionPay.
  • Raw card processor payloads (checkout_mode 1).
  • 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 a mkp_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.

Staging documentation. A checkout made with a secret key on staging charges a real phone. See Environments.