Get started

Errors

Every error code, its HTTP status, and what your integration should do.

Handling errors

A failed call answers success: false with a stable code, a human message (safe to log, not to parse) and, for some codes, details.

  • Branch on code. Most new endpoints also use a matching HTTP status, but some older ones answer business errors with HTTP 200, so the status alone isn't enough.
  • Retry only what can succeed later: RATE_LIMITED, IDEMPOTENCY_IN_PROGRESS, PROVIDER_ORDER_FAILED, ESIM_ACTIVATION_FAILED, INTERNAL_ERROR.
  • Show your own wording to end users. The table suggests what to tell them.

Error codes

CodeHTTPMeaning and what to do
AUTH_UNAUTHORIZED401The token is missing, wrong or was rotated. Check the Authorization header. If you rotated the token, deploy the new one everywhere.
AUTH_WRONG_OTP401The login code is wrong or expired. Ask for a new code with /login and try again.
AUTH_PARTNER_INACTIVE200The partner account is not active yet. Wait for Burj to activate the account, or contact your account manager.
RATE_LIMITED429Too many requests to this endpoint in the last minute. Back off and retry after a minute. Limits are per partner and per endpoint.
PACKAGE_Quantity_NOT_FOUND200order/create was sent without packageId or quantity. Send both fields.
INVALID_QUANTITY200quantity is not a whole number from 1 to 100. Split bigger orders into several orders of up to 100.
INVALID_EXTERNAL_REFERENCE200externalReference is longer than 100 characters. Shorten your reference.
PACKAGE_NOT_FOUND200Unknown packageId (or no longer sold). Reload the packages of the destination and use a current packageId.
INSUFFICIENT_BALANCE200Not enough balance. details.balance and details.required tell you by how much. Top up (or set test money with /sandbox/balance), then retry.
PROVIDER_ORDER_FAILED502The eSIM provider failed. Nothing was charged (details.refundedAmount). Retry with the same Idempotency-Key.
INVALID_IDEMPOTENCY_KEY400The Idempotency-Key is empty, longer than 100 characters or not ASCII. Use a UUID.
IDEMPOTENCY_KEY_REUSED422The same key was sent with a different order. Use a new key for every new order; reuse a key only to retry the same order.
IDEMPOTENCY_IN_PROGRESS409The first request with this key is still running. Retry in a few seconds with the same key.
ORDER_NOT_FOUND200 / 404Unknown order, or it belongs to another account (or environment). Check the orderId and that you use the token of the environment that placed it.
ORDER_INVALID_STATUS200The eSIM was already activated. Read its install details with /{orderId}/data instead.
ESIM_ACTIVATION_FAILED200The provider did not return the eSIM profile. Retry /order/activate a little later.
INVALID_STATUSINVALID_SOURCEINVALID_KIND400A list filter has a value the API doesn't know. Use one of the values listed for that filter.
INVALID_DATEINVALID_DATE_RANGEDATE_RANGE_TOO_LONG400from / to is not YYYY-MM-DD, is reversed, or spans more than 366 days. Send calendar days in Riyadh time, from ≤ to, at most 366 days apart.
INVALID_CURSOR400The cursor did not come from a previous page. Pass pagination.nextCursor as it is. Start again without a cursor after changing filters.
INVALID_MONTH400month is not YYYY-MM, or is in the future. Use a month from /statement/months.
INVALID_INTERVALINVALID_DIMENSION400An analytics parameter has an unknown value. Use one of the documented values.
WEBHOOK_URL_NOT_HTTPSWEBHOOK_URL_INVALID400The webhook URL is not a valid https:// URL. Use a public HTTPS endpoint.
INVALID_EVENTSINVALID_THRESHOLD400Unknown event name, or a low-balance threshold that isn't a positive number. Pick events from availableEvents and send a number for lowBalanceThreshold.
WEBHOOK_NOT_CONFIGURED400Test or rotate was called before a webhook URL was set. Set the URL with /webhook/configuration first.
DELIVERY_NOT_FOUND404Unknown delivery id. Take the id from /webhook/deliveries.
SANDBOX_ONLY403A sandbox endpoint was called with a production token. Use your sandbox (loginType "test") token.
ORDER_NOT_ACTIVATED409The simulator was called before /order/activate. Activate the eSIM first, as you would in production.
INVALID_EVENTINVALID_USAGE_PERCENTUNLIMITED_PACKAGE400 / 409Wrong simulator input, or a usage event on an unlimited package. Check event and usagePercent (0–100). Unlimited packages have no data usage.
INVALID_AMOUNTAMOUNT_TOO_LOWAMOUNT_TOO_HIGHINVALID_CURRENCYINVALID_CALLBACK_URLPAYMENT_GATEWAY_ERRORINVOICE_NOT_FOUNDAMOUNT_MISMATCH400 / 404 / 502Top-up input outside the limits of /topup/config, a bad callback URL, or the payment gateway failed. Check the amount against /topup/config; retry gateway errors later.
COUNTRY_NOT_FOUNDDUPLICATE_COUNTRYTOO_MANY_*NOT_IN_FAVORITESINVALID_ITEMS400 / 404The favorites list refers to an unknown or duplicated destination or package, or is too long. Send ids from /countries and /{countryId}/packages, each once.
INTERNAL_ERROR500Something unexpected went wrong on our side. Retry. For orders, retry with the same Idempotency-Key.