Error Codes

Every error response follows the same shape, so you can handle failures with a single code path:

json
{
  "success": false,
  "error": {
    "code": "INSUFFICIENT_BALANCE",
    "message": "Merchant wallet balance is insufficient",
    "status": 400
  },
  "meta": { "timestamp": "2026-06-28T10:30:00.000Z" }
}

Common error codes

| Code | Status | Description | | --- | --- | --- | | INVALID_PHONE | 400 | Phone number is not registered for mobile money | | INSUFFICIENT_BALANCE | 400 | Wallet balance is insufficient for this operation | | BELOW_MINIMUM_AMOUNT | 400 | Amount is below the allowed minimum | | ABOVE_MAXIMUM_AMOUNT | 400 | Amount exceeds your KYC limit | | DUPLICATE_REFERENCE | 400 | Idempotency key has already been used | | TOKEN_EXPIRED | 400 | The payment token has expired | | TOKEN_ALREADY_PAID | 400 | The payment token has already been paid | | INVALID_API_KEY | 401 | API key is invalid or missing | | TRANSACTION_NOT_FOUND | 404 | No transaction exists for that reference | | RATE_LIMIT_EXCEEDED | 429 | Too many requests in a short period | | PROVIDER_ERROR | 502 | The upstream payment provider returned an error |

Each endpoint page in the API Reference lists the specific error codes it can return.

Handling errors

  • Treat 4xx errors as client-side: fix the request before retrying
  • Treat 5xx errors as transient: retry with backoff, reusing the same Idempotency-Key
  • Always log error.code, not just error.message, since messages may be reworded over time