Skip to content
APILast updated

Errors and Rate Limits ​

Error format ​

json
{
  "error": {
    "type": "authentication_error",
    "code": "invalid_api_key",
    "message": "The API key is missing, invalid, revoked or expired.",
    "param": null,
    "request_id": "req_..."
  }
}
FieldTypeDescription
typestringError type
codestringError code. See Error codes
messagestringDescription in English
paramstring or nullThe parameter that caused the error. Can have a value only for parameter_invalid
request_idstringThe ID of this request, the same as the X-Request-Id response header

Error codes ​

StatustypecodeWhen
400invalid_requestparameter_invalidA query parameter is not accepted or its value is invalid. See Pagination and Filtering
401authentication_errorinvalid_api_keyNo key was sent, or the key is invalid, revoked, or expired
401authentication_errorapi_key_exposedThe key appeared in the URL, or in a header other than Authorization, Cookie, or Proxy-Authorization, and has been revoked
403permission_errorinsufficient_permissionThe key lacks the permission the endpoint requires
403permission_errormerchant_inactiveThe merchant account is deactivated
403permission_errorip_not_allowedThe request's source address isn't one of the key's allowed source addresses
404invalid_requestresource_missingThe path does not exist, or the resource does not exist or does not belong to this merchant
405invalid_requestmethod_not_allowedThe path does not accept this HTTP method
429rate_limit_errorrate_limitedThe rate limit was exceeded
500api_errorinternal_errorServer error
503api_errorservice_unavailableThe service is temporarily unavailable. Retry later

401 responses include a WWW-Authenticate: Bearer header.

Request ID ​

Responses include an X-Request-Id header: req_ followed by 24 alphanumeric characters. The request_id in an error response has the same value.

Rate limits ​

  • Each key is counted separately. Requests with no key, an invalid key, or a source address that isn't one of the key's allowed source addresses are counted by source IP.
  • Responses include X-RateLimit-Limit (the limit), X-RateLimit-Remaining (requests left), and X-RateLimit-Reset (when the limit resets, in UTC epoch seconds).
  • When the limit is exceeded, the request returns 429 rate_limited with a Retry-After header (in seconds). Wait that many seconds, then retry.