API keys
API keys authenticate server-side requests to the CashXChain API.
Environments
CashXChain uses separate keys for sandbox and production.
- Sandbox keys start with
cx_sandbox_. - Production keys start with
cx_live_.
Never use production keys in local development or client-side applications.
Key scopes
API keys can be scoped by permission:
accounts:readaccounts:writewallets:readbeneficiaries:writequotes:writepayments:writestatements:readwebhooks:writeadmin:read
Use the narrowest scope that supports your integration.
Creating keys
Admins can create keys in the dashboard or through the API where enabled. A secret is shown only once. Store it immediately in a secret manager.
Rotation
Rotate keys regularly and immediately after suspected exposure.
Recommended rotation process:
- Create a new key with the same scopes.
- Deploy the new key to your secret manager.
- Confirm successful API calls.
- Revoke the old key.
- Review logs for unexpected usage.
Security requirements
- Store keys only in server-side secret storage.
- Do not commit keys to Git.
- Do not expose keys in frontend code.
- Restrict keys by environment and scope.
- Monitor failed authentication attempts.
- Revoke unused keys.
Compromised keys
If a key is compromised, revoke it immediately and contact CashXChain support if production payment capability may have been affected.