Overview

OneKhusa safeguards the incoming traffic by providing number of requests limit to be processed per second per merchant. If you send many requests in quick succession outside the request limits, you will get error response with http status code 429.

Rate Limiter

Rate limits are applied per merchant account using the X-Merchant-Account-Number header. This means:
  • Each merchant has their own limit which is 50 requests per second
  • Rate limiting is isolated per merchant account: Merchant A’s requests don’t affect Merchant B’s limits

Rate Limited Requests

Requests that are rate limited return HTTP 429 status code with helpful headers that indicate rate limit information:

Response Headers

When rate limited, the API returns these headers to help clients understand rate limit status and determine when to retry:
HeaderDescriptionExamplePurpose
X-RateLimit-LimitMaximum requests allowed per time window50Shows the rate limit threshold
X-RateLimit-RemainingRequests remaining in current time window0Indicates how many requests you can still make
X-RateLimit-ResetUnix timestamp when the rate limit resets1735689600Tells you exactly when to retry