Skip to content

Limits and rate limits ​

Every amount is an integer in minor units: 100 is 1.00 and 15000000 is 150,000.00. Ugandan shillings have no sub-unit, so a UGX amount is still sent in minor units and must be a multiple of 100.

Amounts ​

Payments in ​

A hosted checkout and a direct charge are checked against the country's mobile-money rail when they are created, whatever method the payer later uses.

Kenya (KES, M-Pesa)Uganda (UGX, MTN MoMo)
Minimum1.00 (100)1.00 (100)
Maximum150,000.00 (15000000)5,000,000.00 (500000000)
Whole units onlyNoYes. A multiple of 100

Outside those limits the create answers 422 and code 2702. The Uganda limits are placeholders in the code until MTN's commercial limits are confirmed.

A payment taken for a seller with on_behalf_of must be whole units in both countries: a multiple of 100. Otherwise 400 and code 3017.

Cards ​

  • The card fee is added on top for the payer. You and the seller receive the checkout or charge amount. A charge shows the fee and the total in next_action.fee and next_action.total; the hosted page shows them as card.fee and card.total.
  • Card payments are meant to be whole units. The create call does not check this for a card: a KES amount that is not a multiple of 100 is accepted. Send a multiple of 100 for any payment a payer may pay by card.
  • The card rail's own ceiling (1,000,000.00) is higher than the mobile-money maximum, but the create call applies the mobile-money maximum, so 150,000.00 is the most a Kenyan card payment can be.

Payouts ​

A platform payout must be whole units (a multiple of 100, else 400 and code 1701) and inside the payout rail's limits (else 422 and code 2702).

Kenya (M-Pesa)Uganda (MTN MoMo)
Minimum10.01 by the rail, so 11.00 (1100) in whole units500 (50000)
Maximum150,000.00 (15000000)5,000,000 (500000000)

Field limits ​

FieldLimit
amountInteger, at least 1. Charges: at most 100000000000 before the rail check
reference1 to 64 characters. Required on a charge, optional on a checkout
description1 to 140 characters. The payer sees it
return_url1 to 2048 characters, https
line_items1 to 50. Each description 1 to 140 characters, amount at least 1, quantity 1 to 999. They must add up to amount
Checkout phone9 to 15 digits with the country code, no +
Charge payment_method.phone9 to 15 digits with the country code, + optional, and a number the rail can prompt
payer_emailUp to 254 characters
Charge metadataUp to 20 keys of 1 to 40 characters, string values up to 500 characters
Idempotency-Key1 to 128 characters
Account external_reference1 to 100 printable ASCII characters, no spaces
Account username3 to 50 characters: a-z, 0-9, _
Account first_name, last_name1 to 100 characters, not only spaces
Payout remarks1 to 100 printable ASCII characters
Request body1 MiB on every route but document uploads, which take up to 10 MiB and 64 KiB
Business account documentsOne PDF, JPEG or PNG of at most 10 MB per call, at most 10 on a request
Business account directorsAt most 20

Unknown fields are refused with 400 and code 1701 on every create.

Rate limits ​

Limits are counted in buckets. A bucket is shared by every route that names it, so two routes in one bucket spend one budget. Over a bucket the API answers 429, sets Retry-After to the seconds left, and puts the same number in data.retryAfter.

Your server's buckets are keyed on the account that owns the key, not on the key or your IP address. Replacing a key does not reset them.

BucketRoutesLimitCode
MerchantPOST /checkouts, GET /checkouts/:id, GET /charges/:id, GET /charges, POST /charges/:id/cancel120 a minute1804
Charges per accountPOST /charges300 an hour by default, counted across every key the account holds3005
Prompts per phonePOST /charges with mobile_money5 an hour to one phone, counted across every merchant and the hosted page. A test number is counted per merchant instead, so other developers' tests do not use your budget3005
Prompts per phone from youPOST /charges with mobile_money3 an hour to one phone from your account by default3005
RefundsPOST /refunds, GET /refunds, GET /refunds/:id120 a minute1804
PlatformPOST /accounts, GET /accounts, GET /accounts/:id, GET /accounts/:id/balance, GET /accounts/:id/transactions, GET /transactions, POST /account-links, GET /account-links/:id, every business account request route, GET /accounts/:id/payouts, GET /accounts/:id/payouts/:payout_id120 a minute1804
Payout requestsPOST /accounts/:id/payouts60 a minute1804
Login links per keyPOST /accounts/:id/login-links30 a minute by default3026

Checkouts and charge reads share one budget. A checkout-heavy integration that also polls charges can run out of both at once.

MOOKHPay can change the defaults marked "by default" per deployment, and a deployment can switch rate limiting off altogether (RATE_LIMIT_ENABLED=false). Production has it on. Do not rely on any limit being absent. MOOKHPay can also raise some of them for your account alone; see Raising your limits.

Raising your limits ​

The limits above are per account. Two keys on one account, such as a key and the one it replaced, share one budget, and replacing a key does not reset it.

If you expect more than the defaults, for example a ticket on-sale, ask MOOKHPay before it happens. Say which account, the volume you expect (charges an hour, requests a minute, prompts to one buyer's phone), and the dates it starts and ends. MOOKHPay staff can set higher values for your account alone:

LimitDefaultCan be raised
Charges per account300 an hourYes
Requests a minute, on every bucket that allows 120 a minute120 a minuteYes. One value applies to each of those buckets
Prompts per phone from you3 an hour to one phoneYes, up to the 5 an hour across every merchant
Prompts per phone, across every merchant5 an hour to one phoneNo. It protects payers from being prompted by everyone at once, and is never raised

A raised limit can run until a date MOOKHPay sets, at most a year ahead, such as the end of an on-sale. After that date your account is back on the defaults with nothing for you to do. A raise takes effect within 60 seconds of MOOKHPay saving it.

Polling within the limits ​

  • Poll a pending charge every 2 seconds and stop at next_action.expires_at. One charge polled that way uses about 30 requests a minute of the merchant bucket.
  • Confirm a checkout when the payer comes back to your return_url. For orders where the payer never came back, poll every 10 to 30 seconds, or rely on the webhook.
  • Prefer webhooks to polling for anything you watch for more than a minute.

Platforms ​

LimitValueWhen it is reached
Accounts created a daySet per platform by MOOKHPay, counted on East Africa Time429, code 2950
Unknown account ids100 an hour per platform by default. Every lookup of an id that is malformed, unknown, another platform's or revoked countsEvery account lookup answers 429, code 1804, until the hour from the first miss is up
Platform feeAt most a share of amount set per platform by MOOKHPay, and it must leave the seller at least 100400, code 3017
Payouts a dayA total set per platform by MOOKHPay, counted on East Africa Time422, code 2947, with data.cap, used, remaining
Money out of an account you created, before its identity check passesOne daily cap for every such account, when MOOKHPay switches it on, counted on East Africa Time across sends, withdrawals and payouts. Moves between the seller's own wallets do not count422, code 2948, with data.cap, used, remaining
Login links your platform makes for one account10 an hour by default, counted per platform and account; another platform's links do not count429, code 3026
IP allow-listOptional, set by MOOKHPay staff403, code 3013

A linked account, and an account you created whose identity check has passed, has no platform cap on money out. Its own MOOKHPay limits apply.

Payer limits ​

These are on the hosted page and the card element, not on your key. They protect payers from being prompted repeatedly.

RouteLimit
GET /v1/payments/public/checkouts/:id120 a minute per IP address
POST …/checkouts/:id/pay5 an hour to one phone (shared with direct charges), 20 an hour per checkout, 300 an hour per IP address
POST …/checkouts/:id/card10 an hour per checkout, 200 an hour per IP address
POST …/charges/:id/card200 an hour per IP address (shared with the hosted card route), 10 an hour per charge
POST …/charges/:id/card/payer-auth, …/charge, …/refresh30 a minute per IP address, and 60 an hour per charge for each route

Expiry ​

ObjectLife
Hosted checkout30 minutes by default. Read expires_at
Mobile-money chargeThe prompt's 5 minutes and a 60-second grace: 6 minutes by default. Read expires_at
Pay Bill charge30 minutes by default
Card charge and its client_secret30 minutes by default, or until the charge leaves pending
Card element capture context15 minutes. The element refreshes it
A charge that expired but is then paidStill booked if the payment arrives within 7 days: it moves to succeeded and payment.succeeded is sent
Login linkOne use, within 60 seconds. The session it opens lasts 30 minutes
Account link30 minutes
Payout signing secret, after it is replacedThe old one keeps signing for 24 hours
Payout signature timestampWithin 300 seconds of MOOKHPay's clock
API key after it is replacedKeeps working for 24 hours. Replacing again inside that time ends it at once
Webhook signing secret after it is rotatedThe old one keeps signing for 24 hours, alongside the new one
Webhook delivery history30 days after the delivery was first sent
API key result cache, and the account's allowed addresses60 seconds

List sizes ​

Every list takes limit from 1 to 100 and defaults to 20. See Pagination.

Keys and endpoints ​

Limit
Secret keysOne current key per account, plus the key it replaced for 24 hours. A platform needs an organisation and a key in each country
Allowed addresses50 per account, each an address or a CIDR range. 10 saves an hour
Key issues10 an hour per account, in the hub
Webhook endpoints5 per account
Webhook test sends20 an hour
Webhook secret rotations10 an hour per account
Webhook resends30 an hour per account, and 1 a minute for one delivery
Card element origins10 per mode

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