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.
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>>:
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.