0fra

Errors

How 0fra reports errors and what each code means.

Every error response uses this shape:

{
  "error": {
    "code": "merchant_not_ready",
    "message": "merchant wallet not bound for chain",
    "request_id": "..."
  }
}

request_id is the same value 0fra logs on its side — quote it when contacting support.

Codes

CodeHTTPMeaningWhat to do
invalid_request400Body validation failedInspect details; fix shape
unauthorized401Missing / wrong API key or expired sessionRe-authenticate
signature_invalid401Webhook HMAC mismatch, or merchant attestation invalidRecheck secret + raw body bytes
rate_limited429Too many requests in windowBackoff + retry
order_state_conflict409Operation not allowed in current stateRead state via GET first
duplicate_idempotency_key409Same Idempotency-Key reused with a different bodyUse a fresh key
insufficient_reserve422Refund exceeded merchant reserve and platform absorb is disabledWait for reserve to grow, or override
chain_reorg_pending423Chain hasn't met confirmation depth yetRetry in N seconds
settlement_not_ready423Settlement batch awaiting confirmationRetry
merchant_not_ready422Merchant exists but isn't active or has no wallet boundOnboard the merchant
fee_config_invalid422Platform's fee config or service config missing for this chainContact support
not_found404Resource doesn't exist or doesn't belong to your platform
internal_error500We screwed upRetry; capture request_id and tell us

Retry strategy

For 5xx and 429:

delay = min(2 ** attempt + jitter, 60s)

For 4xx (other than 429): don't retry — fix the request.

For 423 (chain_reorg_pending / settlement_not_ready): retry in 5–30 s.

Logging

We log every API request server-side with the request_id. If something looks wrong:

  1. Capture the request_id from your error response
  2. Email support@0fra.dev with that id + your platform name
  3. We can pull the full server-side trace

On this page