Appearance
Go-live checklist
Work through this list before you take real payments in production. Each item says what to check and where. Tick them off in your own copy.
Staging and production are separate deployments with separate accounts, keys, webhook endpoints, secrets and origin lists. Nothing you set up on staging carries over. See Environments.
Keys and hosts
- [ ] Your account or organisation exists in production, and its
mainwallet is set up. - [ ] You issued a production key in the hub (API Integrations, API Keys, Secret Key) with your PIN. It starts
mkp_live_. Amkp_test_key is a staging key and does not work in production. - [ ] The key carries the scopes you use, and no more. Scopes are fixed when the key is issued and cannot be added later. In an organisation, only an Owner can be issued a key with
charges:write,refunds:writeor a platform scope, and an Owner chooses them on Create A Key; see API keys and scopes. - [ ] The key is in a secret store or an environment variable on your server, and nowhere in a page, an app, a repository or a log. See Security.
- [ ] Your configuration names the production payments host for each country you sell in. A key works only on its own country's host, and every amount is in that country's currency.
- [ ] Someone who can issue keys knows how to replace the key (the old one works for 24 hours more) and how to revoke every key at once if one leaks.
- [ ] If your servers call out from fixed addresses, an Owner set them as the account's allowed addresses, and you tested a call from each.
Creating payments
- [ ] Every create sends an
Idempotency-Keythat you stored with the order before the call, and every retry reuses it. See Idempotency. - [ ] Prices are worked out on your server. The browser never sends an amount.
- [ ] Amounts are in minor units, inside the limits, and whole units wherever a card or a platform fee may be involved.
- [ ] You handle
4093002on charges (a pending charge for the same reference) without creating a second charge. - [ ] You never fulfil from a
return_urlvisit, a card element result in the browser, or a webhook alone. You read the checkout or charge back with your key (GET /checkouts/:id,GET /charges/:id) and fulfil only when it iscompletedorsucceeded. See Confirming payments. - [ ] You fulfil each order once, even if you see the success twice (a webhook and a poll, or a webhook delivered twice).
- [ ] You show the payer the right instruction for each charge's
next_action, and you stop polling atnext_action.expires_at.
Card payments
- [ ] An Owner, Member or Accountant saved your production checkout pages on the Live list (API Integrations, API Keys, Card Payment Pages). Exact origins such as
https://shop.example.com, or one wildcarded leading label such ashttps://*.example.com; at most ten;httpsonly. - [ ] Your page loads the pinned
mookhpay.jswith itsintegrityhash andcrossorigin="anonymous". See Versioning. - [ ] Your Content Security Policy allows the CyberSource hosts the element loads. See Card payments.
- [ ] The
client_secretgoes only to the checkout page, and is not logged. - [ ] You ran one real card payment of a small amount in production. Card charges cannot be tested on a test key.
Webhooks
- [ ] You created your production endpoints in the hub (API Integrations, Webhooks) and copied each endpoint's own
whsec_secret to the server that receives it. In an organisation, an Owner switched on any endpoint a Developer added. - [ ] Each endpoint is a public
httpsaddress that answers2xxwithin 8 seconds and does not redirect. - [ ] Your receiver verifies
x-mookh-signatureover the raw body and refuses a stalex-mookh-timestamp. See Verify signatures. - [ ] Your receiver accepts any one matching signature in
x-mookh-signature, so it keeps working through a secret rotation. See Verify signatures. - [ ] Your receiver answers
2xxfirst and does slow work afterwards, skips an eventidit has already handled, and does not assume events arrive in order. See Retries and ordering. - [ ] You subscribed only to the events you handle, and you answer
2xxto any you ignore. - [ ] You sent a test event to each endpoint from the hub and saw it verify.
Platforms
- [ ] MOOKHPay switched your production organisation on as a platform, and you agreed your maximum fee share, daily account cap and daily payout cap with them.
- [ ] Your organisation's own
mainwallet exists, so it can receive platform fees. - [ ] An Owner made the production payout signing secret, and it is deployed only to the service that sends payouts. You know how to rotate it with the 24-hour overlap. See Pay out sellers.
- [ ] Your servers' clocks are synchronised. A payout timestamp more than 300 seconds off is refused.
- [ ] If your servers have fixed addresses, you asked MOOKHPay to set an IP allow-list for your platform, and you tested a call from each address.
- [ ] You show sellers MOOKHPay's terms and record when they accepted and which version, before you create their accounts.
- [ ] You store each seller's
acct_…id against your own record, and handleaccount.claimedandaccount.disconnected. - [ ] You handle
4222947and2948on payouts by readingdata.remaining, not by retrying. - [ ] Login links are made when the seller taps your button and are never stored, emailed or logged.
Limits and monitoring
- [ ] Your polling stays inside the rate limits, and every client handles
429by waitingRetry-Afterseconds. - [ ] You log the HTTP status,
codeanddescriptionof every error, with your own request id. - [ ] You alert on repeated
5xx, and in particular on503with codes2782(keys cannot be checked),2752(ledger),3016(accounts) and3020(transaction feed). - [ ] Someone watches the Deliveries card on API Integrations, Webhooks (the last 30 days, with Resend), and the address on the account receives MOOKHPay's email when an endpoint starts failing.
- [ ] If you expect a spike, such as an on-sale, you asked MOOKHPay to raise your limits for those dates.
- [ ] You have a job that finds orders still unpaid or unconfirmed after the checkout or charge expired, and reads them back.
Reconciliation
- [ ] You match payments to orders by your own
reference, and to statements byprovider_receipt(the M-Pesa or card reference) and MOOKHPay's receipt:ledger_referenceon a webhook,payment.referenceon a checkout read,receipt_numberon a charge. - [ ] You read checkout amounts as strings and charge, account and payout amounts as numbers, both in minor units.
- [ ] A platform reconciles fees with the
platform_feeandneton each payment, and its sellers' wallets withGET /transactions.
Test on staging first
Staging is not a sandbox: it calls live rails, and a hosted checkout made with a staging key charges a real phone. Direct charges made with a staging key are test charges, paid only by the test numbers. Before going live, run on staging:
- [ ] A charge with each of the four test numbers, and your handling of each outcome and webhook.
- [ ] A hosted checkout paid with your own phone for a small amount, confirmed on your server.
- [ ] A create retried with the same
Idempotency-Keyafter a forced timeout, giving one payment. - [ ] A cancelled charge and an expired one.
- [ ] A webhook with a bad signature and one with an old timestamp, both refused by your receiver.
- [ ] For platforms: a seller account created, a payment with a fee, the seller dashboard read, a payout signed and sent, a login link opened, and a revocation handled.