Errors
Every error has the same shape: code, message, field (the request field at fault, or null), docsUrl (a link to its entry here), requestId (quote it when you contact us) and sometimes detail. Branch on code, not on the message.
{
"code": "QUOTE_EXPIRED",
"message": "That quote has expired. Get a new one.",
"field": "quoteId",
"docsUrl": "…/errors#quote_expired",
"requestId": "req_…"
}Retry 429, 5xx and 409 IDEMPOTENCY_KEY_IN_USE with backoff (the SDKs do), reusing the same Idempotency-Key. Do not retry other 4xx unchanged.
| Code | HTTP | Meaning and what to do |
|---|---|---|
INVALID_REQUEST | 400 | The request does not match the spec: a missing or malformed field (named in field), or a combination the API does not accept. Fix the request; retrying it unchanged fails again. |
UNAUTHORIZED | 401 | No API key, or the key is unknown, revoked, expired or for another environment. Send Authorization: Bearer sk_test_…. A customer token answers this too when it is unknown, expired, or sent from an origin other than the one it was created for. |
FORBIDDEN | 403 | The key or token is valid but may not do this: a missing scope, a customer token used on a server-only route, a customer token setting receiver or markupBps, or acting for an organisation you do not belong to. |
NOT_FOUND | 404 | No such resource for this organisation and mode. Test and live objects are separate. |
CONFLICT | 409 | The resource already exists, for example a customer with the same external id. |
IDEMPOTENCY_KEY_REUSED | 422 | This Idempotency-Key was used before with a different request body. Use a new key for a new request. |
IDEMPOTENCY_KEY_IN_USE | 409 | A request with this Idempotency-Key is still running. Wait, then retry with the same key to get its result. |
RATE_LIMITED | 429 | Too many requests. Wait for the number of seconds in Retry-After, then retry; the SDKs do this for you. |
TENOR_OUT_OF_RANGE | 400 | The tenor or maturity is outside the range Certa quotes. The message gives the allowed range. |
STALE_PRICE | 503 | The price feeds have not updated recently enough to quote safely. Retry in a few seconds. |
FEEDS_DISAGREE | 503 | The price feeds disagree by more than Certa allows, so it will not quote. Retry shortly. |
LIMIT_EXCEEDED | 422 | The lock would take the customer or your organisation over a limit. detail.limit says which limit; GET /v1/limits shows how much room is left. |
INSUFFICIENT_LIQUIDITY | 503 | The pool cannot take this lock right now. Try a smaller amount or a shorter tenor, or retry later. |
KYB_REQUIRED | 422 | The customer has not passed KYB. Start it with POST /v1/customers/{id}/kyb and wait for the customer.kyb_updated event with status approved. |
QUOTE_EXPIRED | 422 | The quote is past its expiresAt (quotes are firm for 30 seconds). Get a new quote. |
QUOTE_USED | 409 | A lock was already created from this quote. Each quote locks once. |
PRICE_MOVED | 422 | The early exit now costs more than the maxCost you sent, so nothing was signed, sent or changed. detail.cost is the new cost and detail.maxCost yours; preview again and confirm with a new maxCost (and a new Idempotency-Key). |
WRONG_STATE | 409 | The lock is not in a state that allows this, for example cancelling a lock that has settled or reached maturity. |
NOT_AVAILABLE_IN_MODE | 422 | This works only in another mode, for example sandbox tools or managed execution with a live key. |
PARTNER_NOT_ACTIVE | 422 | A markup above 0 needs your organisation's payout address activated on-chain (FeeRouter) first, in any mode. In the sandbox (hosted or local), POST /v1/sandbox/partner/activate does it, free; otherwise quote with markupBps: 0. |
WALLET_SCREENING_FAILED | 422 | Wallet screening refused one of the customer's wallets. Contact support with the requestId. |
TRANSACTION_FAILED | 422 | An on-chain transaction Certa sent for you (managed execution, or a sandbox tool) was refused by the chain. The message gives the chain's reason; nothing was recorded, and the lock is unchanged. Check the wallet holds enough USDC for gas and the amounts, then retry with a new Idempotency-Key. |
FAUCET_EMPTY | 503 | The sandbox faucet is out of test funds. Try again later; we top it up by hand. |
UNAVAILABLE | 503 | A dependency is down or not configured. Retry with backoff. |
INTERNAL | 500 | Something went wrong on Certa's side. It has been logged; contact support with the requestId. |