Use client keys when the key will ship inside something your users can inspect: a mobile app, a web bundle, an open-source SDK. Use server keys for anything running on a backend you control.
When to pick which
If you own the environment the key runs in (your servers, a VPC, a private container), use a server key. If end users can extract the key by opening devtools, decompiling an APK, or reading a git repo, use a client key.Getting a key
Every new partner is provisioned with both keys automatically. Find them in the dashboard under API Keys. Client keys can be revealed at any time (they’re public). Server keys are shown once at creation and hashed afterward. Additional keys of either type can be created from the same page.Scopes
Client keys are scope-gated. Only these actions are permitted:
Any request outside this allowlist returns
403 forbidden with "This route is not available for client keys". There is no opt-in: client keys cannot read transaction history, manage webhooks, or touch affiliate data, regardless of what scopes are assigned.
Modes
When you create a client key you choose a mode. The mode determines how theOrigin header is enforced.
Allowed origins are a per-key list configured at creation time. Leave the list empty to accept any origin (useful when you can’t enumerate SDK consumers up front). Global CORS (
CORS_ALLOWED_ORIGINS) still applies in every case.
Read-tokens
Client keys are shared across many end users. If user A callssubmit, user B must not be able to read user A’s order by guessing the ID. Orchestra enforces this with short-lived HMAC read-tokens.
(partnerId, apiKeyId, orderId, expiry). Tokens for other orders, other keys, or expired tokens return 403 read_token_required or 403 invalid_read_token.
Server keys don’t need a read-token; they can read any order under the partner.
SSE subscriptions (/v1/sse/operations/:id) follow the same rule. Because EventSource can’t set headers, pass the read-token as a query param:
Rate limits
Client keys are rate-limited at two layers. Server keys are not limited by these buckets.
The per-(key, IP) layer stops a single abusive user from exhausting the partner’s aggregate budget. The per-key layer is the DoS ceiling. Both return
429 rate_limited with Retry-After when tripped.
Privileged fields are stripped
Request bodies passed with a client key have privileged fields silently removed before validation. This includes anything that would let a caller redirect fees, override tiers, or inject admin flags. The request continues as if those fields were never sent; no error surfaces so the schema stays opaque.Revocation and disable
Client keys support two lifecycle actions:- Disable (
POST /v1/partner/dashboard/api-keys/:id/disable): the key starts failing auth immediately, but in-flight operations continue to completion. Reversible: an operator can re-enable the key at any time. - Revoke (
DELETE /v1/partner/dashboard/api-keys/:id): permanent. Setsrevoked_at; in-flight operations continue, but no new requests succeed.