Skip to content

Changelog ​

Changes to the merchant API, the payer routes, webhooks and mookhpay.js, newest first. Most features below are switched on per deployment; where one is off, its routes answer 404. GET /balance and GET /balance/transactions are on everywhere. See Environments and Versioning.

25 November 2026 ​

Fix your payout signature ​

  • The signing recipe in these docs was wrong. Create a payout and Pay out sellers said to sign timestamp + "." + body. MOOKHPay signs and checks timestamp.METHOD.path.Idempotency-Key. followed by the raw body, where path is the request path from /v1/payments/merchant/ with no host and no query string. A signature over the timestamp and body alone answers 401 and code 3021.
  • What to change: build the signed string from the timestamp, the method in capitals (POST), the path, the Idempotency-Key you send, each followed by a ., then the body bytes. The test vector is new too. See How to sign a request.
  • Each signature is accepted once. A retry keeps its Idempotency-Key and body and is signed again with a fresh timestamp; resending a signature answers 3021.
  • The same signature, secret and rules protect the new pay-in and payout destination routes.

Pockets and pay-ins ​

  • A platform can have a pocket: a wallet with its name on it, opened inside each connected person's MOOKHPay wallet. MOOKHPay staff set the pocket up; it is available in Kenya. See Pay into your users' pockets.
  • Pay-ins: POST /accounts/:id/transfers moves money from your platform's main balance into a person's pocket, free, in whole currency units, signed, with an Idempotency-Key and an external_reference unique across your platform. Each platform has a daily pay-in cap, which starts at 0 until MOOKHPay sets it. Read pay-ins with GET /accounts/:id/transfers and GET /accounts/:id/transfers/:transfer_id. See The transfer object.
  • There is no transfer.* webhook event. A pay-in settles on the call; confirm it from the call's answer, or by reading it. See Confirm a pay-in without a webhook.
  • In pocket mode, GET /accounts/:id/balance and GET /accounts/:id/transactions show only your pocket. The balance adds pocket and available; movements are newest first, with type transfer_in, payout, payment_out, moved_in or moved_out, and the person's own moves read "Moved by you". See Balances and dashboards.
  • In pocket mode, a payout comes out of your pocket, with the fee on top from the pocket, and a failed payout returns to the pocket. A company account's payout is refused with 422 and code 3037. See Pay out sellers.
  • The account object adds pocket (slug, name, status, balance_currency). See The account object.

Payout destination by code ​

Disconnected accounts answer 409 ​

  • Where pockets are on, an account whose holder disconnected your platform now answers 409 and code 3061 (PLATFORM_ACCOUNT_DISCONNECTED) on every route that names it, instead of 404 and code 2943. It does not count toward the unknown-id limit. If your code treats only 404 as "gone", handle 409 3061 too. See account.disconnected.

Your own balance ​

Fees API ​

  • GET /fees answers what MOOKHPay charges today: payout, topup and card fees, each a string in minor units. It needs a platform key with accounts:read, payouts:write or transfers:write. Payouts are still free. See Fees.

How a payment was paid ​

  • payment.succeeded and payment.failed carry method: mpesa, momo, airtel, card or mookhpay, and GET /checkouts/:id carries it as payment.method, beside payment.rail. These fields were already sent but missing from these docs. The hub's test events do not include method yet. See the event catalogue and The checkout object.

API keys ​

  • New scopes transfers:write (pay into pockets; a platform scope, Owner only) and balance:read (read your own balance; Owner only, not a platform scope). A scope cannot be added to a key: replace the key with one that has every scope you need. See Which scopes a platform key needs.
  • X-Staff-ID, X-Staff-Permissions and X-Staff-Reauth are refused with 400 and code 3014, like the other identity headers.
  • The pay-in and payout destination routes check the key afresh on every call, so a revoked key stops at once.

Error codes ​

  • New codes 3060 to 3067: PLATFORM_BALANCE_INSUFFICIENT, PLATFORM_ACCOUNT_DISCONNECTED, PLATFORM_TRANSFER_CAP_REACHED, PLATFORM_POCKET_NOT_READY, PLATFORM_POCKET_NOT_SET_UP, OTP_INVALID, OTP_EXPIRED and PLATFORM_TRANSFER_NOT_FOUND. 3037 is also answered on a pocket-mode payout for a company account.
  • Errors from the pocket routes carry the code's name in data.error, beside any other data. See Errors.

24 November 2026 ​

Payout fees ​

  • Payouts are free for now. The fee is reported on every payout so a fee can be charged later without a change to the API: it would be taken from the wallet on top of amount, the phone would still receive exactly amount, and a payout that fails or is reversed would return it. See Fees.
  • The payout object has fee and total (amount + fee), integers in minor units like amount.
  • 2732 INSUFFICIENT_BALANCE on POST /accounts/:id/payouts now means the wallet does not hold amount plus the fee. A payout that empties a wallet must leave room for the fee.
  • A refund paid back to the payer's phone follows the payout fee, free for now. The refund object has fee: 0 for a refund to a MOOKHPay balance, to a card or by hand, and while method is null.
  • Transfers between MOOKHPay accounts are free. A payer who pays a checkout or charge by mobile money still pays exactly the amount.
  • openapi.yaml adds fee and total to Payout and fee to Refund.

Breaking: a checkout's Idempotency-Key now compares the body ​

  • POST /checkouts with an Idempotency-Key it has seen and a different body now answers 422 and code 3015. It used to answer 200 with the first checkout. The same key and the same body still answer 200 with the first checkout, as before. If your code reuses a key when an order changes, give the changed order a new key. See Idempotency.
  • A checkout made before this change has no stored body to compare, so its key keeps answering 200 with that checkout whatever the body.

Webhooks ​

  • Every event body has an id (evt_…), also sent as the X-Mookh-Event-Id header. It is the same on every retry, every resend and every endpoint of your account that receives the event. Deduplicate on it. See Retries and ordering.
  • An endpoint's secret can be rotated in the hub with Rotate Secret. For 24 hours both secrets sign each delivery, in one header, newest first: X-Mookh-Signature: sha256=<new>, sha256=<old>. Split the header on ,, trim each part and accept any one match in constant time. A verifier that compares the whole header with one signature will refuse every delivery during a rotation. The samples on Verify signatures are updated.
  • Resend in the hub's Deliveries sends a delivered or failed delivery again: one attempt, with the same id. A delivery still pending (2816), one whose endpoint is off (2817) or one that is gone (2815) cannot be resent.
  • Delivery history is kept for 30 days and paged in the hub with Load More, where it used to show the latest 50.
  • New events refund.declined (MOOKHPay declined a refund; carries decline_reason) and refund.failed (an attempt to send a refund's money failed and the refund went back for review; carries attempt and method, and can be sent more than once for one refund). Every refund event now also carries charge_id and status. See the event catalogue.

Refunds ​

  • POST /refunds, GET /refunds and GET /refunds/:id, with the new refunds:write scope, which only an Owner can issue. A refund names one checkout_id or charge_id, and an amount or nothing for all that is left; a part must be whole currency units. MOOKHPay reviews every refund before money moves. A payment taken through a platform cannot be refunded. See Refunds and Create a refund.
  • New error codes 2861 to 2864 on these routes. See Errors.

API keys ​

  • An Owner chooses a key's scopes on the hub's Create A Key and Replace Key. Members and Accountants still make checkouts keys.
  • Replace Key keeps the old key working for 24 hours, so you can deploy the new one first. An account holds at most two live keys; replacing again inside the 24 hours ends the older one at once. Revoke ends every live key, within a minute. See API keys and scopes.
  • An Owner can set Allowed Addresses for the account's keys in the hub, with their PIN: up to 50 IPv4 or IPv6 addresses or CIDR ranges. A call from any other address answers 403 and code 3042. A change takes up to 60 seconds. A platform's own list, set by MOOKHPay staff, still applies on platform routes. See Allowed addresses.

Limits ​

  • Rate limits are counted per account, not per key; the charges limit is renamed Charges per account to say so.
  • MOOKHPay can raise an account's charges an hour, requests a minute and prompts to one phone from you, until a date if you like, such as the end of an on-sale. Ask with your expected volume and dates. The limit of 5 prompts an hour to one phone across every merchant is never raised. See Raising your limits.

Documentation ​

20 November 2026 ​

Direct charges ​

  • POST /charges, GET /charges/:id, GET /charges?reference= and POST /charges/:id/cancel, with the charges:write scope. A charge prompts the payer's phone (mobile_money), answers a Pay Bill number to show them (paybill, Kenya), or opens a card payment for the card element (card). See Direct charges and Create a charge.
  • A charge made with a mkp_test_ key is a test charge, paid only by the test numbers. Pay Bill and card charges are refused on a mkp_test_ key with 400 and code 3004.
  • New webhook events charge.expired and charge.cancelled. payment.succeeded and payment.failed for a charge carry charge, metadata and failure. See the event catalogue.
  • New error codes 3001 to 3007. See Errors.

Card element ​

  • mookhpay.js 1.0.0, at https://mookhpay.co/js/v1/1.0.0/mookhpay.js (pinned, with an SRI hash) and https://mookhpay.co/js/v1/mookhpay.js (latest). It takes the card in CyberSource fields on your page, so card data never reaches your server. See Card payments.
  • Four browser routes under /v1/payments/public/charges/:id/card, authorised by the charge's client_secret and an allowed Origin. See Card element routes.
  • The pages allowed to take card payments are a list per account, kept separately for mkp_live_ and mkp_test_ charges and saved in the hub under API Integrations, With Code, Card Payment Pages. A page not on the list is refused with 403 and code 2776.

Platforms ​

  • Seller accounts: POST /accounts, GET /accounts/:id and GET /accounts. See Open seller accounts.
  • Payments for a seller with a platform fee: on_behalf_of and platform_fee on POST /checkouts and POST /charges. See Take payments with a fee.
  • Balances and movements: GET /accounts/:id/balance, GET /accounts/:id/transactions and the all-accounts feed GET /transactions. See Balances and dashboards.
  • Payouts: POST /accounts/:id/payouts, signed with the platform's payout signing secret, plus GET /accounts/:id/payouts and GET /accounts/:id/payouts/:payout_id. See Pay out sellers.
  • Login links (POST /accounts/:id/login-links) open a 30-minute view-only MOOKHPay session for a seller. See Login links.
  • Account links (POST /account-links, GET /account-links/:id) ask an existing MOOKHPay user to let your platform in. The link's url is answered once, on the 201; a replay answers url null. account.linked is sent when the owner approves, with data { link_id, scopes, approved_at }. See Link an existing account.
  • Business account requests for sellers: POST /accounts/:id/org-requests, documents, submit and read. See Business accounts.
  • New key scopes charges:write, accounts:read, accounts:write, accounts:link, payments:write, payouts:write and login_links:write. An Owner chooses them on the hub's Create A Key (from 24 November 2026). See API keys and scopes.
  • New webhook events account.created, account.linked, account.claimed and account.disconnected. account.updated can be subscribed to but is not sent yet.
  • New error codes 2941 to 2950 and 3011 to 3040.

Merchant API, all keys ​

  • A request to /v1/payments/merchant that carries a session or identity header, such as X-User-ID or X-Acting-As, is refused with 400 and code 3014.

Documentation ​

  • The guides are regrouped by task: get started, accept payments, platforms, webhooks, going live and API conventions.
  • New pages: Quickstart: direct charge, Quickstart: platform, Testing, Card payments, the platform guides, the four webhook pages, Go-live checklist, Security, Pagination, Versioning and the creator marketplace tutorial.
  • Every guide step and API page has samples in curl, Node, Python and PHP.
  • openapi.yaml covers every merchant route and the public routes a merchant integration uses, including the card element routes. Its paths are now written in full (/v1/payments/merchant/checkouts), with the host alone as the server.
  • Corrections: a checkout's reference is shown to the payer under the amount; a field or header error is answered after the key and scope checks, not before; the payer rate limits are 300 pay attempts and 200 card attempts an hour from one address.
  • Moved: /guide/platforms is now /platforms/overview, /guide/webhooks is /webhooks/overview, and /guide/test-numbers is /guide/testing. The old addresses redirect.

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