@coin-voyage/paykit, wiring up the required providers, and rendering a PayButton that launches the CoinVoyage payment modal — all in under five minutes.
Prerequisites
- A React application (Next.js, Vite, Create React App, etc.)
- Node.js 18 or later
- A CoinVoyage account
Steps
1
Install the SDK
Install
@coin-voyage/paykit and its required peer dependency @tanstack/react-query.2
Create an API key
Open the CoinVoyage Dashboard and create an organization if you haven’t already. Then navigate to Developers and create an API key.You will receive two values:
- API Key (public) — safe to use in client-side code. Expose as
NEXT_PUBLIC_COIN_VOYAGE_API_KEY. - API Secret — server-side only. Never expose this in client-side code.
3
Add the providers
Wrap your app with Then import and use
QueryClientProvider, WalletProvider, and PayKitProvider. In a Next.js app, create a providers.tsx file:providers.tsx
<Providers> in your root layout:app/layout.tsx
4
Render a PayButton
Add When a user clicks the button, CoinVoyage opens a modal where they can select their preferred chain and token to pay with.
<PayButton> anywhere in your app to launch the CoinVoyage payment modal. The example below creates a deposit button that settles 10 SUI to your specified wallet:components/deposit-button.tsx
Next steps
SDK reference
Explore all provider options, PayButton props, and the ApiClient.
How it works
Understand the full payment lifecycle from order creation to settlement.
Webhooks
Receive real-time notifications when payments complete or fail.
Dashboard
Monitor transactions, configure settlement, and manage your API keys.