Error Reference

API response format

All successful responses follow this shape. meta is present only on paginated list endpoints.

Success
{
  "success": true,
  "data": { ... },
  "meta": { "page": 1, "per_page": 20, "total": 45, "total_pages": 3 }
}

All error responses follow this shape:

Error
{
  "success": false,
  "error": {
    "code": "ERROR_CODE",
    "message": "Human readable description"
  }
}

The messageis written to be actionable — it names the field or rule that failed, and often the fix. Read it; don't switch on it (messages can improve over time). Switch on the HTTP status and code instead.

HTTP status codes

CodeMeaning
200Success
201Created (e.g. payment link, bank account, withdrawal)
400Bad Request — invalid input, business-rule violation, or invalid status transition
401Unauthorized — invalid, missing, or inactive API key/token
403Forbidden — you don't have permission (e.g. a user_id that isn't a party to the escrow)
404Not Found — resource doesn't exist (or belongs to another merchant/environment), or no route matches the path
405Method Not Allowed — the path exists but not with this HTTP method (e.g. POST on a GET endpoint)
409Conflict — currently only on registration when the email is already taken
410Gone — a hosted action link has expired
429Too Many Requests — rate limited
500Internal Server Error

Error codes

CodeWhen
BAD_REQUESTInvalid input or a business rule refused the request — validation failures, invalid escrow status transitions, duplicate order_id, duplicate dispute, wrong-role action links. The message says which rule.
UNAUTHORIZEDMissing or invalid session token
INVALID_API_KEYX-API-Key missing, invalid, or the merchant is inactive / not yet approved for live
FORBIDDENAuthenticated, but not allowed — e.g. acting on another merchant's escrow, or a user_id that isn't a party
NOT_FOUNDThe resource doesn't exist — including ids that belong to another merchant or the other environment — or the URL path matches no route (the message names the path)
METHOD_NOT_ALLOWEDThe path exists with a different HTTP method — the message names the method you sent (405)
EMAIL_TAKENRegistration with an email that already has an account (409)
RESEND_TOO_SOONVerification code requested again too quickly
RATE_LIMITEDToo many requests — back off and retry (429)
LINK_EXPIREDA hosted action link is past its expiry (410) — mint a new one
INTERNAL_ERRORSomething failed on Kashia's side — safe to retry idempotent requests