Add it to the quote
Passpartner_fee with an address and an amount. Both are required together.
Rules
amountis a flat amount in the token’s normal units, for example"0.20"USDC. It is not a percentage. To charge a percentage, calculate it before you request the quote.- The amount is capped per chain. A quote over the cap returns
400 partner_fee_too_high. addresscan’t be the sender or the recipient.- On Solana,
addressmust already have a token account for the asset. Create the associated token account once, before your first quote. Otherwise the quote returns400.
Net and gross mode
In net mode, the default, your fee is added on top:total_debit = amount + fee + partner_fee.
In gross mode, with treat_as_gross_amount: true, your fee comes out of amount along with Bitnob’s: recipient_amount = amount − fee − partner_fee. If amount doesn’t exceed both fees together, the quote returns 400 invalid_request. See Sweep a full balance.
Show it to the user
List your fee separately from the network fee in your confirmation screen. Both appear on chain, so a single combined “fee” line can look like a hidden charge to a user who checks.Reconcile your fees
Your fee arrives atpartner_fee.address when the transfer completes. To reconcile, match incoming credits to that address against sponsored transfers in completed status, using the stored tx_hash and partner_fee.amount. List sponsored transfers returns only the most recent page, so store each transfer’s id, tx_hash, and partner_fee in your own records as it completes, rather than relying on listing later.