Skip to main content
ApiClient is the server-side interface to the CoinVoyage v3 API. Import it from @coin-voyage/paykit/server and use it in API routes, server actions, or backend services. Every method returns an APIResponse<T> wrapper with either data or error.
Keep your API secret on the server. The SDK can create DEPOSIT orders with the public API key, but SALE, refunds, list operations, off-ramp operations, invoices, webhooks, and fees require a server-generated authorization signature.

Initialization

string
required
Your organization’s API key from the CoinVoyage dashboard.
string
default:"production"
API environment. Accepted values are "production", "development", and "local".

APIResponse<T>

Every ApiClient method returns a Promise<APIResponse<T>>:
Check error before using data:

Reference

Authentication

Generate server-side signatures for privileged operations.

Orders

Create orders, retrieve quotes, and generate payment instructions.

Wallet and search

Search currencies and retrieve multi-wallet portfolios.

Swaps

Quote and execute standalone swaps.

On-ramp

Integrate Stripe Link and embedded card-funded on-ramp flows.

Off-ramp

Manage verification, bank accounts, and fiat payout intents.

Invoices

Create, publish, list, retrieve, archive, and delete invoice drafts.

Fees

Retrieve and claim organization fee balances.

Webhooks and WebSockets

Manage webhook subscriptions and consume real-time order events.

Core types

Reference shared order, status, payment, and funding types.