API Overview
The ZendFi API is a REST API that accepts JSON request bodies and returns JSON responses. All endpoints are versioned under/api/v1/.
Base URL
Authorization header determines which Solana network is used.
Request Format
All requests must include:Authentication
Protected endpoints require a valid API key as a Bearer token:Idempotency
For write operations (POST, PUT, PATCH), include an Idempotency-Key header to make retries safe.
- The key is scoped per merchant and endpoint.
- Repeating the same key with the same request payload returns the original response.
- Reusing the same key with a different payload returns
409conflict. - If an identical request with the same key is still processing, the API can return
409in-flight conflict (idempotency_in_flight). - Stored idempotency records expire after 24 hours.
idempotencyEnabled is true (the default).
The CLI also sends idempotency keys for write requests and supports explicit keys on core payment/intent commands.
Error Format
All errors follow a consistent structure:HTTP Status Codes
Common Error Codes
Rate Limits
Requests are rate-limited per merchant account:
Rate limit information is included in response headers:
429 with a JSON body indicating when to retry.