Skip to Content

Responses and errors

The response envelope and every error code.

Success

{
  "success": true,
  "data": { "balance": 15230.5, "currency": "DZD" },
  "meta": { "timestamp": "2026-11-15T10:30:00.000Z" },
  "requestId": "req_8fK2mQx7Lp0aZ3nV1cWb"
}

Error

{
  "success": false,
  "error": {
    "code": "INSUFFICIENT_BALANCE",
    "message": "Insufficient balance",
    "details": { "required": 500, "available": 120 }
  },
  "requestId": "req_Zk1o9P2nB7c4XqLw0eRt"
}
  • Branch on error.code, never on message. Messages can change; codes don't.
  • details is optional. For ERR_VALIDATION it lists the fields at fault: [{ "field": "MSSIDN", "message": "…" }].
  • requestId is also sent as the X-Request-ID header. Include it when you contact support.
  • The HTTP status always matches the code below.

Error codes

CodeHTTPMeaning
MISSING_ACCESS_TOKEN401The X-Access-Token header is missing.
INVALID_ACCESS_TOKEN401The API key is unknown, revoked or malformed. details.attemptsLeft shows how many failures remain before the IP is blocked.
IP_BLOCKED403Too many failed authentication attempts from this IP. Wait 15 minutes.
IP_NOT_ALLOWED403The request IP is not in this key's allowed IP list.
API_DISABLED403API access is disabled for this key or account.
ACCOUNT_DISABLED403The account is suspended or not approved. Do not retry.
READ_ONLY_KEY403This key is READ-ONLY and cannot create top-ups.
SERVICE_NOT_ALLOWED403This service (mobile or internet top-up) is not enabled for your account.
INSUFFICIENT_BALANCE403Your balance is too low. details has required and available amounts. Nothing was charged.
DUPLICATED_REF403A top-up with this ref already exists. Check it with check-ref instead of sending again.
ERR_STOCK403This card value is out of stock. Try another value or retry later.
ERR_VALIDATION400The request is invalid. details lists the fields at fault. Nothing was charged.
ERR_PHONE400The phone or line number is invalid, does not exist, or does not match the type.
NOT_FOUND404The resource does not exist or belongs to another account.
NOT_DEBT_PENDING409resolve-debt was called for a top-up that is not DEBT_PENDING (already answered, expired or finished).
DUPLICATE_IN_PROGRESS409An identical top-up for this number is still being processed. Wait for it to finish.
PAYLOAD_TOO_LARGE413The request body is larger than 32 KB.
RATE_LIMIT_EXCEEDED429Too many requests. Wait for the number of seconds in Retry-After.
INTERNAL_ERROR500Unexpected error. For a send, check the top-up by ref before retrying.
ERR_SERVICE503The operator or provider is temporarily unavailable. Nothing was charged; retry later.
AUTH_UNAVAILABLE503Keys cannot be verified right now. Your key is fine; retry after Retry-After seconds.
SERVICE_UNAVAILABLE503The platform did not answer in time. The outcome of a send is unknown: check it by ref before retrying.

Which errors to retry

RetryCodes
Yes, after a pauseRATE_LIMIT_EXCEEDED, AUTH_UNAVAILABLE, ERR_SERVICE, DUPLICATE_IN_PROGRESS
Only after checking the refSERVICE_UNAVAILABLE, INTERNAL_ERROR on a send
No, fix the request firstERR_VALIDATION, ERR_PHONE, INSUFFICIENT_BALANCE, ERR_STOCK, READ_ONLY_KEY, IP_NOT_ALLOWED
No, read the existing top-upDUPLICATED_REF
No, contact supportACCOUNT_DISABLED, API_DISABLED

On this page