Skip to content
Terra WalletDevelopers

Early access. The Terra API and SDKs may change before launch, and the SDK packages are not published yet.

View as Markdown

API basics

Early access

Rate limits

The Terra API limits requests per key and per organization. Every response tells you where you stand, so you can slow down before you hit the limit.

Headers#

HeaderMeaning
RateLimit-LimitThe number of requests allowed in the current window
RateLimit-RemainingHow many requests are left in the current window
RateLimit-ResetSeconds until the current window ends

Limits are counted per API key, per dashboard session, and per client IP on public routes, in fixed windows. Sign-in routes add their own tighter limits.

When you hit the limit#

The API returns 429 with the code RATE_LIMITED, a Retry-After header and retryAfter in the body, both in seconds:

Text

HTTP/1.1 429 Too Many RequestsRetry-After: <seconds> { "error": { "code": "RATE_LIMITED", "message": "...", "requestId": "req_...", "retryAfter": <seconds> } }

Wait that long, then retry with exponential backoff and jitter. Retried creates must reuse the same Idempotency-Key (see Idempotency).

Public checkout routes#

The public routes that hosted checkout uses (/v1/checkout/...) have strict per-IP limits and Turnstile checks. Do not call them from your server: use the authenticated routes with your secret key.

Edge protection#

On top of the API's own limits, Cloudflare's edge applies WAF and rate-limit rules to /api/v1. A burst that looks like abuse may be stopped at the edge before it reaches the API.

Good habits#

  • Read RateLimit-Remaining and slow down as it approaches zero.
  • Batch your own work: create payment intents when a customer checks out, not ahead of time.
  • Use webhooks instead of polling for payment status.
  • Give background jobs their own key with only the scopes they need, so you can watch and revoke them separately. Remember that the organization-wide limit still covers every key.