API Keys
API keys authenticate all requests to the ZendFi API. Each key is scoped to either test or live mode, and the prefix tells you which environment it targets.| Prefix | Mode | Network |
|---|---|---|
zfi_test_ | Test | Solana Devnet |
zfi_live_ | Live | Solana Mainnet |
List API Keys
Response
Create an API Key
Either
test or live.Example
Response
Rotate an API Key
API key ID to rotate.
Response
Key Security
Storage
Storage
Keys are hashed with both SHA-256 (for fast lookup) and Argon2 (for breach resistance) before being stored. ZendFi never stores plaintext keys.
Environment Variables
Environment Variables
Always store keys in environment variables or a secrets manager. Never commit them to source control. Use
.env files locally and your platform’s secrets management in production.Key Rotation
Key Rotation
Rotate keys regularly and immediately if a key may have been exposed. Rotation is atomic — the old key is deactivated the moment the new one is created.
Mode Isolation
Mode Isolation
Test keys cannot access live data and vice versa. This prevents accidental production charges during development.
Rate Limits
API keys are rate-limited per merchant:| Endpoint Category | Limit | Window |
|---|---|---|
| Payment creation | 50 requests | 1 hour |
| Dashboard / reads | 200 requests | 1 hour |
| All other endpoints | 100 requests | 1 hour |
429 Too Many Requests with a Retry-After header.