Skip to content

Errors

Partner API errors use the standard JSON envelope. Merchant-redeem uses a success envelope with success, message, statusCode, and data.

Error Envelope

json
{
  "statusCode": 400,
  "message": "Validation failed",
  "error": "Bad Request"
}

Field Meaning

FieldTypeDescription
statusCodenumberHTTP status code returned by the endpoint.
messagestringHuman-readable error message.
errorstringStandard HTTP error label, for example Bad Request or Conflict.

Common Status Codes

CodeMeaning
400Invalid body, invalid path parameter, or missing/invalid required header (for example Idempotency-Key).
401Missing or invalid authentication headers (X-API-Key, X-Timestamp, or X-Signature).
403API key is not allowed for the caller IP or the operation is blocked by policy.
404Requested resource was not found.
409Idempotency conflict (same key with different payload) or request already in progress for that key.
422Business rule rejection—for example partner limit checks, or account not enabled for the requested product line.
502Upstream provider failure while processing the request.
503Service temporarily unavailable.
504Upstream provider timeout.
500Unexpected server error.

Validation Notes

  • Validation failures may return message: "Validation failed" when multiple field errors are present.
  • If your account is not enabled for a product line, write endpoints return 422 with a message such as Partner is not entitled to purchase Airtime.
  • Merchant-redeem business failures can return HTTP 200 with success: false and a body statusCode, such as 4035 for an incorrect verification code.
  • Treat message as the primary troubleshooting signal and statusCode as the handling branch.
  • Provider and server-side failures return sanitized messages; internal traces and raw upstream diagnostics are not exposed in API responses.

Callback Error Codes

When you subscribe to failure callbacks, context.errorCode may include:

CodeMeaning
PRODUCT_NOT_ENTITLEDAccount is not enabled for the product line requested.