API behavior

Idempotency

POST /api/invoices is not idempotent — each call creates a new invoice. Cassia does not honor an Idempotency-Key header; deduplicate on your side using your own request key before calling. Webhook receivers should be idempotent — see Edge cases.

Rate limits

Two limits are currently enforced — be defensive with 429:

  • 1000 req/min per IP across all endpoints.
  • 10 invoice creates/sec per merchant on POST /api/invoices.

These ceilings are well above normal usage and exist to prevent runaway clients. We may add tighter per-key application limits later; treat 429 as “back off and retry with jitter”.

Pagination

List endpoints accept limit (default 50, hard cap varies per endpoint) and offset. GET /api/billing/transactions caps at 200. CSV exports paginate server-side and stream the full filtered result.

Error envelope

Every error response uses the same JSON shape:

json
{
  "error": "CONFLICT",
  "message": "Wallet for this chain is already registered."
}

Error code catalog

errorHTTPMeaning
UNAUTHORIZED401Missing/invalid API key or session cookie.
FORBIDDEN403Account suspended (read-only mode), or TOTP missing on a 2FA-gated route.
NOT_FOUND404Resource not visible to your merchant_id.
CONFLICT409E.g. duplicate xpub.
RATE_LIMITED429Per-IP or per-merchant ceiling hit. Back off + retry.
VALIDATION_ERROR400Request body failed schema validation. The message field names the offending property.
ERROR400Generic 400 — usually a wallet or invoice domain rule (wrong xpub depth, wrong chain family, uncancellable status). Read message for the human-readable reason.
INTERNAL_ERROR500Unhandled server error. Cassia records it on our side; safe to retry idempotent requests after a delay.
payment_network_unavailable503The payment network could not register the invoice, even after Cassia retried automatically. Transient — retry in a few seconds. The invoice was not created and nothing was reserved, so a retry is not a duplicate.
solana_network_unavailable
solana_monitoring_unavailable
503Solana only. A chain provider Cassia depends on is failing, so no deposit address could be prepared (first code) or registered for monitoring (second). Transient — retry. The invoice was not created and nothing was reserved, so a retry is safe and is not a duplicate. Not a problem with your request.

Soft-suspend (read-only mode)

If your account is suspended (after an emergency-lock or admin action), all writes return 403 Forbidden with message Account suspended — read-only mode. Contact support. GET requests and POST /api/auth/logout still succeed so you can finish ongoing reconciliation and sign out cleanly.

Updated . For integration help, email [email protected]

From signup to payment setup in 7 minutes

Start accepting
payments today
on 5 blockchains.

Create accountRead documentation