Reference

Errors & rate limits

Blockcade uses conventional HTTP status codes. Every error response is JSON with a stable machine-readable type.

Error shape

{
  "error": {
    "type":    "invalid_request",
    "message": "amount must be greater than 0.",
    "param":   "amount"
  }
}

HTTP status codes

CodeMeaningWhat to do
200SuccessContinue.
201Resource createdRead the response body for the new object.
400Invalid requestCheck the message and param field. Do not retry unchanged.
401Missing or invalid API keyCheck your Authorization header.
403ForbiddenWrong environment (test key on live endpoint) or unverified merchant.
404Not foundThe resource doesn't exist or belongs to another merchant.
409ConflictSession is not in the expected state (e.g. already paid).
429Rate limitedBack off. Respect Retry-After header.
500Server errorRetry with exponential backoff.
502/503Upstream provider unavailableRetry with exponential backoff.

Common error types

error.typeWhen
invalid_request Missing or malformed field. param tells you which one.
authentication_requiredNo API key, wrong header format, or key revoked.
rate_limited Hit your per-key rate limit.
not_found Reference doesn't exist under this account.
invalid_state Session isn't in a state that allows the action (e.g. cancelling a paid session).
provider_error Underlying payment provider (CoinGate/Alchemy Pay) rejected the request.

Rate limits

Test mode
25 req/sec
Per API key.
Live mode
100 req/sec
Per API key. Higher tiers on request.

Handling 429

async function withRetry(fn, maxRetries = 4) {
  for (let i = 0; i <= maxRetries; i++) {
    try { return await fn(); }
    catch (err) {
      if (err.status !== 429 || i === maxRetries) throw err;
      const wait = 1000 * Math.pow(2, i);   // 1s, 2s, 4s, 8s
      await new Promise(r => setTimeout(r, wait));
    }
  }
}

Debugging

  • Failed calls show up in Dashboard → API keys → recent requests (coming soon).
  • Webhook failures show up in Dashboard → Deliveries with the full response body from your endpoint.
  • For anything unexplained, email support@blockcade.app with your reference or delivery_id.