PayLumiaDevelopers

Reference

Errors

Every error has a stable code, an HTTP status and, when it makes sense, retry guidance.

Shape

Codes follow XXX-###: a domain prefix and a number. When a retry could succeed, the body says so with retryable and, if known, retryAfterSeconds (also sent as a Retry-After header).

402 Payment Required
{
  "success": false,
  "error": {
    "code": "PAY-101",
    "message": "Subscriber balance is insufficient",
    "retryable": true,
    "retryAfterSeconds": 14400
  }
}

Common codes

CodeHTTPMeaning
ATH-002401Token missing, malformed or not recognised.
AUZ-002403Your application lacks the capability for this route.
VAL-001400A required field is missing.
VAL-002400A field has an invalid format or value.
VAL-006400Unknown property, for example amount or msisdn in hosted mode.
SEC-001429Rate limit reached.
CAT-102404Offer not found.
CAT-103422Offer is not active.
CAT-104403Your application is not authorised for this offer.
CAT-109409This one-time item is already owned.
PAY-101402Subscriber balance is insufficient. Retryable.
PAY-103402Charge declined by the operator. Retryable.
PAY-104409A request with this idempotency key is still in progress. Retry shortly.
PAY-105409Idempotency key reused with a different payload.
SBR-102400Mobile number is invalid.
SBR-104422This mobile operator is not supported.
RSK-101403The subscriber has opted out of carrier billing.
SUB-101404Subscription not found.
SUB-104409Subscription is already canceled.
SUB-105409No scheduled cancellation to withdraw.
SUB-108409Trial already used for this product.

Handling them well

  • Branch on the code, not the message. Messages can be reworded.
  • Retry only when retryable, and after the suggested delay.
  • On PAY-104, wait and retry with the same Idempotency-Key.