Reference

Errors & status codes

Century returns a consistent error envelope. Read the code, not the message — messages are written for humans and may change.

Envelope

Error response
{
  "success": false,
  "error": {
    "code": "INSUFFICIENT_BALANCE",
    "message": "Insufficient wallet balance.",
    "request_id": "req_xxxxxxxxx"
  }
}

Server failures also carry an error ID that support can trace to a structured log entry. Surface it to your users when you show a failure screen.

Codes

StatusCodeMeaningWhat to do
401UNAUTHORIZEDMissing, expired or invalid bearer token.Refresh the session and retry once.
403FORBIDDENAuthenticated, but the account is not allowed to perform this action.Do not retry; the caller lacks the role.
403KYC_REQUIREDThe action needs a higher KYC tier than the account holds.Send the user through the required tier, then retry.
400VALIDATION_FAILEDThe request body did not match the schema (wrong type, missing field, out-of-range amount).Fix the payload; retrying unchanged will fail again.
400NETWORK_MISMATCHThe recipient number does not belong to the selected network.Correct the network or the phone number.
400INVALID_PINThe 4-digit transaction PIN was wrong or is not set.Re-prompt for the PIN. Repeated failures lock the PIN temporarily.
402INSUFFICIENT_BALANCEThe wallet cannot cover the amount plus fees.Ask the user to fund the wallet, then retry.
404NOT_FOUNDThe referenced transaction, order or reference does not exist for this caller.Check the identifier; do not retry blindly.
409DUPLICATE_REQUESTA request with the same reference/idempotency key was already processed.Treat as success and read the original result.
422PROVIDER_REJECTEDThe upstream provider declined the order (bad plan, closed account, biller down).The wallet is refunded automatically. Surface the message and let the user retry or pick another plan.
424PROVIDER_UNAVAILABLEThe upstream provider is unreachable or returned a 5xx.Retry with backoff; Century may auto-swap to an equivalent plan.
429RATE_LIMITEDToo many requests from this account or IP in a short window.Back off and retry after the cooldown.
500SERVER_ERRORUnexpected failure. Logged with an error ID.Retry once; if it persists, contact support with the error ID.

Retry policy

  • 401 — refresh the token, retry once.
  • 429, 424, 500 — retry with exponential backoff and jitter, max 3 attempts.
  • 400, 402, 403, 404, 422 — never retry unchanged.
  • 409 — the original request already succeeded; read the result instead of retrying.
Never blind-retry a purchase
A purchase that returns a timeout may still have been fulfilled. Poll the transaction by its reference before issuing another one, otherwise you risk double-spending the user's wallet.