Skip to content

Error Handling

Response Format

All errors return a JSON body with a detail field:

json
{
  "detail": "Human-readable error message"
}

For validation errors (422), the body contains field-level errors:

json
{
  "detail": [
    {
      "type": "value_error",
      "loc": ["body", "txn_currency"],
      "msg": "Currency code must be exactly 3 letters (ISO 4217)",
      "input": "EURO"
    }
  ]
}

Error Codes

HTTPMeaningAction
400Invalid request (e.g. unknown BIN)Fix the request data
401Authentication failureCheck token — regenerate if expired
422Validation error (missing/invalid field)Fix the field value — see Enum Reference
429Rate limit exceededRetry after Retry-After header value
500Internal errorRetry with backoff
503Service unavailableRetry after Retry-After header value

Retry Strategy

ConditionAction
400, 401, 422Do not retry — fix the request
429Retry after Retry-After header
500Retry up to 3 times: 100ms → 200ms → 500ms + jitter
503Retry after Retry-After header
Network timeoutRetry once after 200ms, then stop

Add random jitter (±50ms) to each delay to prevent thundering herd at high volume.

Idempotency

Sending the same txn_id multiple times is safe. The analytics pipeline uses UPSERT semantics — duplicate requests update the existing record rather than creating duplicates.

Rate Limits

Rate limits are enforced per API key at the entity level.

PlanRequests / secondRequests / minute
Starter10500
Pro1005,000
ScaleCustomCustom

Every response includes rate limit headers:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 847
X-RateLimit-Reset: 1714003260

Health Check

GET https://api.recivr.com/health

No authentication required. Returns:

json
{
  "status": "ok",
  "service": "rts"
}

Recommended polling interval: 30 seconds.

For system-wide status, subscribe to notifications at status.recivr.com.

Recivr — The intelligence layer of the payments stack.