This is an enterprise-only feature. Please contact us to enable.
- 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.
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.
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
percentageis not strictly between0and1, - the recipients’ percentages add up to
1or more, or - a
walletAddressis not a valid EVM or Solana address.
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: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, andhasClaimableFees 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.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.