Endpoint-level schemas, request bodies, and response examples are available in the generated API Reference. This page explains the conventions that apply across the API.
Base URL
Production API requests use:environment option:
Authentication
CoinVoyage uses two credential types:
Signed requests use the
Authorization header value:
METHOD + path + timestamp, where path excludes the /v3 prefix. For example, sign POST /orders, not POST /v3/orders.
Public API key flows
DEPOSIT orders can be created with the public API key because the recipient address is supplied by the integration and no merchant settlement configuration is modified.
Signed server-side flows
SALE orders, refunds, order listing, invoices, off-ramp verification, bank account management, off-ramp intents, webhook management, and fee operations require your API secret.
Where off-ramp APIs fit
Off-ramp verification, bank accounts, and off-ramp intents are optional. They do not replace orders, and they are not required when you only want on-chain settlement to a wallet.Bank-account payouts are optional. You can bring your own externally owned account (EOA), receive funds there, and move funds anywhere you want from that wallet. Use off-ramp intents only when your product needs a CoinVoyage-managed fiat payout to a linked bank account.
Where swap APIs fit
Swap APIs are for standalone on-chain asset exchanges. They are separate from checkout and deposit orders: an order may use swaps internally while routing a payment, butswapQuote() and swapExecute() are useful when your product wants to quote and execute a swap as its own user action.
Request conventions
- Send JSON request bodies with
Content-Type: application/json. - Use ISO 8601 timestamps in UTC for stored times and event payloads.
- Treat IDs as opaque strings. Do not parse structure out of order IDs, webhook IDs, quote IDs, transaction hashes, or off-ramp intent IDs.
- Store token amounts exactly as returned by the API. Prefer raw string amounts for accounting systems that require exact precision.
- Attach your own order, user, or invoice identifiers in
metadataso webhook handlers can reconcile events without a separate lookup.
Response shape
The SDK wraps every result inAPIResponse<T>:
error before using data:
Error handling
Handle API errors by status code category:Rate limits
When a request exceeds a limit, CoinVoyage returns429 Too Many Requests. Back off instead of retrying immediately, and use the Retry-After response header when it is present.
See Rate limits for retry guidance and response headers.
Pagination and listing
List endpoints return paginated data when the result set can grow over time. Use pagination for reconciliation jobs, dashboards, exports, and backfills instead of assuming a single response contains every record. When consuming paginated endpoints:- Keep the original filter set stable while walking pages.
- Store the last successful cursor, page, or timestamp checkpoint for long-running jobs.
- Expect new records to appear while you paginate.
- Reconcile by order ID rather than by page position.
Idempotency and retries
Network requests can time out after CoinVoyage receives them. Design your integration so retrying does not create duplicate business effects:- Store your internal order ID in order
metadata. - Before creating a replacement order, check whether your internal order already has an active CoinVoyage order.
- Treat webhook deliveries as at-least-once events and order IDs as payment lifecycle IDs.
- Make fulfillment idempotent by recording the CoinVoyage order ID and terminal status before shipping goods, crediting balances, or updating inventory.
Webhook-first processing
Production integrations should use webhooks for payment state changes:- Create an order from your server.
- Store the CoinVoyage order ID against your internal order or account.
- Show the payment modal to the user.
- Verify webhook signatures before parsing the event.
- Update internal state from outcome and recovery events such as
ORDER_COMPLETED,ORDER_REFUNDED,ORDER_EXPIRED,ORDER_ERROR, orORDER_PARTIAL_PAYMENT. - Run a scheduled reconciliation job that compares your internal state with the CoinVoyage API.
Go-live requirements
Before using production credentials, confirm that:- Your API secret is stored server-side only.
- Webhook signature verification is enabled.
- Fulfillment is idempotent.
- Failed, expired, refunded, and partial-payment states are handled.
- Your settlement currency and wallet address are configured in the dashboard if you create
SALEorders without explicitcurrencyandrecipientvalues. - You have tested a full payment, refund, and webhook flow in the intended environment.