NairaCheck
API reference menu

API contract

Errors and rate limits

Every failure uses the same envelope. Branch on code, log request_id and retry only the conditions documented as transient.

Error envelope
{
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded. Retry in 12 seconds.",
    "request_id": "req_9f4c2b7a8d1e4f60"
  }
}
CodeHTTPAction
missing_api_key401Add the Authorization header; do not retry unchanged.
invalid_api_key401Use the correct key or rotate it in the developer portal.
insufficient_scope403Request access to the product scope.
validation_failed422Correct the fields listed in error.details.
rate_limit_exceeded429Wait for Retry-After before retrying.
upstream_rate_limited503Back off; CAC throttled the NairaCheck upstream connection.
upstream_unavailable503Retry with exponential backoff and jitter.

Rate-limit headers

  • X-RateLimit-Limit — requests allowed per sliding minute.
  • X-RateLimit-Remaining — requests left in the current window.
  • X-RateLimit-Reset — seconds until capacity returns.
  • Retry-After — wait time included on a 429 response.