Introduction
Coin Voyage is a service that provides seamless Cross-Chain Crypto Payments for Your Business.
Quick start
To get started using Coin Voyage, import @coin-voyage/paykit
into your project.
npm i @coin-voyage/paykit @tanstack/react-query@^5.61.1
Head over to Business Dashboard  and create an Organization.
Under the Developer
section you’ll find a api key generated tied to the organization.
Once you have an COIN_VOYAGE_API_KEY
the next section shows you a basic implementation.
Here is an example of basic usage:
components/deposit-button.tsx
"use client"
import { PayButton, PayKitProvider, WalletProvider } from "@coin-voyage/paykit"
import { ChainId } from "@coin-voyage/paykit/server"
import type { WalletConfiguration } from "@coin-voyage/paykit/types"
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
const queryClient = new QueryClient()
export function DepositButton() {
if (!process.env.NEXT_PUBLIC_COIN_VOYAGE_API_KEY) {
throw new Error("NEXT_PUBLIC_COIN_VOYAGE_API_KEY is required")
}
return (
<QueryClientProvider client={queryClient}>
<WalletProvider>
<PayKitProvider apiKey={process.env.NEXT_PUBLIC_COIN_VOYAGE_API_KEY}>
<PayButton
intent="Deposit to SUI"
toChain={ChainId.SUI} // Deposit to SUI
toAddress="0xYourWalletAddress" // SUI deposit wallet
toAmount={10} // Deposit 10 SUI
style={{
width: "100%",
borderRadius: "0.375rem",
}}
onPaymentStarted={(event) => {
console.log("Payment is being processed")
}}
onPaymentCompleted={(event) => {
console.log("Payment Completed")
}}
/>
</PayKitProvider>
</WalletProvider>
</QueryClientProvider>
)
}
Last updated on