Skip to main content
This is an enterprise-only feature. Please contact us to enable.
You can add your own fee to a Flow payment: a percentage of the source amount, paid to wallets you name. Your server attaches a fee config when it creates the flow. The recipient does not have to be you; for example, a platform can pay the fee to its own merchants. Adding your own fee explains the concept, and this page gives the requests. The fee is collected by the provider that routes the payment, so it applies to these payments:
  • Deposit-address payments, whether or not the payment needs a conversion.
  • Wallet payments that need a swap, because the payer’s token or chain differs from your settlement.
Direct wallet transfers, where the payer already holds a settlement token on a settlement chain, and exchange payments carry no added fee. A flow with disableSwaps collects the fee on deposit-address payments only, because every wallet payment in that flow is a direct transfer. Depending on the provider, a fee reaches the recipient in one of two ways:
  • Paid on chain with the payment. The fee goes to the recipient’s wallet as part of the payment, and there is nothing to claim.
  • Accrued as a claimable balance. The fee accumulates off chain, typically as USDC, and the recipient claims it later with the claim requests. Claims are available for EVM recipients.
An integration that adds fees should handle both: check claimable balances periodically and claim what is waiting.

Add a fee config

feeConfig is an optional field on the create request in every mode, and on payment links. It is fixed when the flow is created.
The create request returns 422 when:
  • there are no recipients, or more than one recipient in the same address family (EVM or Solana),
  • a percentage is not strictly between 0 and 1,
  • the recipients’ percentages add up to 1 or more, or
  • a walletAddress is not a valid EVM or Solana address.
Each recipient’s share is its percentage of the source amount, calculated independently.

Supported chains for fees

A provider can pay a recipient only on the chain families it supports for a given payment, and it skips a recipient it cannot pay. The fee is not always paid on the chain the payer paid from: a payment that started on Solana can pay your fee to an EVM address. Name both an EVM and a Solana recipient to give each payment the best chance of carrying the fee:
Use the same percentage for both. A payment pays only one of them, so your fee rate stays the same. Some payments carry no fee even with both recipients named, for example a deposit-address payment that starts and settles on Solana. The payer can pay from any supported chain. Fees to a Solana recipient arrive on chain with the payment. Fees that accrue to an EVM recipient are collected with the claim requests below.

Check claimable balances

Check whether a recipient has fees waiting to be claimed. The response lists the balance per token and chain, and hasClaimableFees says whether anything is waiting. Paths are relative to https://app.dynamic.xyz/api/v0, and every fee request uses your API token with flow.write.
Response (200):
An empty balances list (hasClaimableFees: false) means there is nothing to claim right now. Either no fees have accrued, or every fee was paid on chain with its payment.
Error (400): recipientAddress is not a valid EVM address.

Claim accrued fees

A claim takes two requests. The first returns the messages the recipient wallet must sign, and the second submits the signatures. The recipient wallet’s signature authorizes the release. 1. Initiate the claim.
Response (200):
An empty steps array means there was nothing to claim, so there is nothing to sign or submit. Error (400): recipientAddress is not a valid EVM address. 2. Sign each step with the recipient wallet, then submit the signatures.
Response (200):
After a successful submit, check balances again. The claimed balance should now be empty.

Example: claim in TypeScript

claim-fees.ts
Sign data.message exactly as returned, without reconstructing or changing it. data.signatureKind is eip191, a standard personal-sign message, so a library’s signMessage, such as viem’s, produces the right signature.
Last modified on October 28, 2026