This is an enterprise-only feature. Please contact us to enable.
Prerequisites
Before starting a flow on the client, create one from your backend. The flow creation endpoint is server-side only, authenticated by an API token withflow.write scope — this is where amount, currency, settlement, and destination are fixed.
flow.id — pass this as the flowId to your frontend when calling the SDK functions below.
Optional — collect your own fee. Add a
feeConfig to the create body to take a percentage of each swap to your own EVM wallet(s). Recipient addresses must be EVM (0x…). See Fee collection and claiming for the config shape, how to check balances, and how to claim accrued fees.Supported Chains
Flow supports the following chains:- BTC
- EVM
- SOL
- SUI
- TRON
TRON cross-chain swaps currently route through intent-based bridges and may incur higher gas costs relative to the transfer amount.
fromChainName: 'SOL', fromChainId: '101') and quote with a Solana token mint (or 11111111111111111111111111111111 for native SOL). submitFlowTransaction handles the Solana versioned-transaction signing for you.
Except for the EVM chains listed below, only mainnet is supported:
Overview
The flow follows these steps:- Attach the source wallet with
attachFlowSource - Quote the conversion with
getFlowQuote - Submit the transaction with
submitFlowTransaction(prepares, signs, and broadcasts) - Poll for completion with
getFlow
Resume a flow from its current state
A flow ID represents one execution attempt. On page load, retry, or reconnect, callgetFlow before calling a mutation. Do not unconditionally call attachFlowSource again.
Full example
Exchange source
To accept payment from a Coinbase exchange account instead of a wallet, attach an exchange source:Handling cancellation and errors
Error reference
Each SDK function can throw errors with an HTTP status code and a message. The table below lists common errors by step, their cause, and how to resolve them.Create flow (backend)
Attach source (attachFlowSource)
Get quote (getFlowQuote)
Quote failure response format:
When no quotes are available, the 422 response includes a
quoteFailures array:
symbol on chainName/chainId) and the failure reason.
Quote failure reasons:
Prepare signing (prepareFlowSigning / submitFlowTransaction)
Broadcast (broadcastFlow)
Cancel (cancelFlow)
Polling for status
After submission, pollgetFlow to track progress through execution and settlement states:
Deposit address
With a deposit address flow the user sends funds directly to a generated address — no wallet connection or on-chain signing required. Works for BTC, SOL, EVM, and TRON. The flow uses theattachFlowSource / getFlowQuote / getFlow functions (not the checkout namespace).
1
Attach a deposit address source
2
Get a quote — response includes the deposit address
3
Poll until the transfer is detected
The backend detects the inbound transfer automatically. Poll
getFlow until executionState leaves "quoted":There is no signing step. Once the user sends funds to
depositAddress, the transfer is detected automatically and the flow advances to source_confirmed.Related
attachFlowSource- Attach source wallet or exchangegetFlowQuote- Get a conversion quotesubmitFlowTransaction- Submit for signing and broadcastgetFlow- Poll flow statecancelFlow- Cancel a flowbroadcastFlow- Record a broadcast (for manual or exchange flows)prepareFlowSigning- Prepare signing (advanced, usually called bysubmitFlowTransaction)