Skip to main content
Fireblocks Flow is an enterprise feature. Contact us to enable it for your environment.
This guide sets up the JavaScript SDK for Flow payments and walks through a first payment from a connected wallet. Your server creates the flow, and the payer’s page uses the SDK to attach a source, get a quote, and send the payment. The same setup covers every mode: payment, deposit, and withdraw.

Prerequisites

  • A Dynamic environment with Fireblocks Flow enabled.
  • A Dynamic client created and initialized, as described in Creating a Dynamic client.
  • A server that can call the Dynamic API. Your API token stays on that server.

Enable chains in the Dynamic Console

Open Chains & Networks in the Dynamic Console and enable every chain your payers will pay from. Wallet payments support these chains: Each chain you enable appears when the payer connects a wallet. Deposit-address and exchange payments do not need a chain extension, because the payer pays outside your app. Supported chains lists the chains each payment source supports.

Install chain extensions

Install the packages for the chains you enabled:
Then add an extension for each chain when you create the client. Extensions register the wallet providers the SDK uses to find, connect, and sign with wallets on that chain.
Add extensions only for the chains you enabled. The WalletConnect extensions are optional, and they let payers connect mobile wallets such as MetaMask Mobile or Phantom by scanning a QR code. Adding extensions lists every extension.

Create an API token

In the Dynamic Console, go to Developer > API Tokens and create a token with the flow.write scope. Your server uses it to create flows, and also to read and cancel them from the server and to manage fees. Keep the token on your server and read it from an environment variable or a secrets manager. The payer’s page never needs it: reading a flow and attaching a source need no credential, and attaching a source returns a session token that the SDK stores and sends for the rest of the payment. Access and data explains each credential.

Create a flow from your server

Your server creates the flow and fixes its mode, amount, currency, settlement tokens, and destinations. The mode goes in the path. This example creates a payment flow for 25 USD that settles in USDC on Base, and reads the API token and environment ID from environment variables:
The response wraps the new flow in flow. Pass flow.id to the payer’s page, where the SDK functions take it as flowId. Share the flow ID only with the payer, because it is enough to read the flow and to attach a source before the payment is sent. The modes differ in who sets the amount: The Flow payments API guide lists every field of the create request.
Optional: add your own fee. Add a feeConfig to the create request to take a percentage of the payment for yourself or for your own customers. Recipients can be EVM or Solana addresses, with at most one recipient per address family. The fee applies to deposit-address payments and to wallet payments that need a swap. Direct wallet transfers and exchange payments carry no fee. Adding your own fee explains when the fee applies, and the Fees API gives the config shape and how to claim fees.
Optional: require an exact match. Add disableSwaps: true when the payer must pay with a token and chain that already match one of your settlements. See Conversions.

Send a first payment

On the payer’s page, connect a wallet with your usual wallet connection UI, then attach it to the flow, get a quote, and send the payment with submitFlowTransaction. submitFlowTransaction prepares the transaction, asks the wallet to sign and send it, and reports it to the flow.
The payment is done when flow.settlementState is completed. A flow whose executionState is source_confirmed has received the payer’s funds but has not finished delivering them, so keep reading it until settlement completes or fails. Payment lifecycle and states describes every state. Decide fulfillment on your server, from webhooks or a server read of the flow, rather than from what the payer’s page reports. Access and data explains why.

Next steps

Build a custom payment UI

Every payment source, quote refresh, errors, cancel, expiry, and reload.

Handle Flow errors

The error classes each function throws and how to recover.

Flow payments

Modes, payment sources, and how you know a payment worked.

Flow payments API guide

The HTTP requests behind each SDK function.
Last modified on October 29, 2026