End-to-end payment flow
The sequence diagram below shows every actor and message involved in a complete payment:Detailed flow steps
1
Order creation
Your server (or the SDK’s
ApiClient) creates an order specifying the destination chain, asset, and amount. CoinVoyage returns an order ID and immediately fires an ORDER_CREATED webhook. You then pass that ID to the payment modal so the user can begin.The main create modes are Deposit and Sale. Refunds are created through the dedicated refund endpoint. See Orders for details.2
Payment method selection
The user opens the payment modal and picks their preferred chain and token. CoinVoyage supports payment from:
- SUI — Sui blockchain
- BTC — Bitcoin
- SOL — Solana
- EVM — Ethereum, Arbitrum, Base, Optimism, Polygon, BSC, and more
3
Quote generation
CoinVoyage builds quotes by:
- Scanning wallet balances to identify tokens the user can pay with
- Querying providers for live rates — AMMs (Uniswap V2, V3, and V4; Jupiter; Cetus), Across and CCTP for cross-chain routes, and direct same-chain transfers
- Optimizing routes by chaining providers together when that yields a better rate
- Ranking quotes by best effective output (highest received amount, lowest fees)
4
Quote selection and payment details
After the user picks a quote, CoinVoyage generates the exact payment instructions for that route:
- Deposit address — a unique address generated for this payment
- Exact amount — the precise token amount to send
- Expiration time — the payment window, typically 30 minutes
- Refund address — where funds return if anything goes wrong
5
User payment
The user sends the exact amount to the deposit address from their wallet. CoinVoyage monitors the blockchain for:
- Transaction submission — the payment has been broadcast
- On-chain confirmation — the transaction is included in a block
- Amount verification — the correct amount was received
ORDER_CONFIRMING webhook as soon as the transaction is detected.6
Backend execution
Once payment is confirmed, CoinVoyage executes the selected route. Routes can involve a single provider or a chain of providers:Single-provider flowMulti-provider chainCoinVoyage handles route execution, error recovery, and real-time status webhooks throughout this stage. If any step fails, an automatic refund is initiated.
Webhook subscriptions and delivered payloads use uppercase
ORDER_* identifiers, such as ORDER_EXECUTING.7
Settlement and completion
When funds arrive at the destination address, CoinVoyage marks the order as
COMPLETED and fires the ORDER_COMPLETED webhook. All relevant transaction hashes are recorded on-chain.If execution fails at any point:- An automatic refund is initiated
- Funds are returned to the user’s refund address
- The order status changes to
REFUNDED - An
ORDER_REFUNDEDwebhook is fired
Provider chaining example
CoinVoyage can chain multiple providers together to find the best possible route for a given payment. Here is what that looks like when a user pays with ETH on Ethereum and you want to receive SUI:- Automated — no manual intervention required at any step
- Optimized — the best route is calculated in real time before the user confirms
- Transparent — all fees, routes, and timing are shown to the user upfront
- Fast — typically completes in under 60 seconds