Skip to main content

Authentication

CashXChain uses bearer tokens for API authentication.

Authorization header

Authorization: Bearer cx_sandbox_...

Key types

Key typeEnvironmentUsage
Sandbox keySandboxDevelopment, testing, simulated payments.
Production keyProductionLive payment workflows.

Server-side only

API keys must only be used from trusted server-side environments. Never expose a CashXChain API key in browser JavaScript, mobile apps, public repositories, logs, or analytics tools.

Scopes

Keys can be scoped to reduce risk. Example scopes:

accounts:read
accounts:write
beneficiaries:write
quotes:write
payments:write
statements:read
webhooks:write

Authentication errors

HTTPCodeMeaning
401authentication_requiredMissing bearer token.
401invalid_api_keyKey is invalid or revoked.
403insufficient_scopeKey lacks required permission.
403environment_mismatchKey was used against the wrong environment.

Key rotation

Rotate keys regularly and whenever you suspect exposure.

Webhook signatures

API authentication protects requests to CashXChain. Webhook signatures protect events sent from CashXChain to your system. Configure both for a secure integration.