Skip to main content
This is an enterprise-only feature. Please contact us to enable.
Flow lets you send a crypto payment from any supported chain and have it settled in a specific token on a specific chain. This guide walks through the complete flow, from creating a flow to polling for settlement completion.

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 with flow.write scope — this is where amount, currency, settlement, and destination are fixed.
The response includes 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.
The SDK signs internally, so the same flow works regardless of the payer’s chain — pass a wallet account on the relevant chain. The full example below pays from EVM; to pay from Solana, attach a Solana source (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:
  1. Attach the source wallet with attachFlowSource
  2. Quote the conversion with getFlowQuote
  3. Submit the transaction with submitFlowTransaction (prepares, signs, and broadcasts)
  4. 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, call getFlow before calling a mutation. Do not unconditionally call attachFlowSource again.
source_confirmed means source execution is finished, not necessarily that settlement is finished. Keep tracking settlementState until it reaches completed or failed.

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:
Each entry identifies the settlement token that failed (symbol on chainName/chainId) and the failure reason. Quote failure reasons:

Prepare signing (prepareFlowSigning / submitFlowTransaction)

Broadcast (broadcastFlow)

Cancel (cancelFlow)

Polling for status

After submission, poll getFlow 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 the attachFlowSource / 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.
Last modified on July 15, 2026