# Fees



import { Callout } from 'fumadocs-ui/components/callout';

Every quote prices the transfer before the user signs. The fee is taken from
the transfer itself, not charged separately.

What makes up the fee [#what-makes-up-the-fee]

| Component    | What it is                                          |
| ------------ | --------------------------------------------------- |
| Transfer fee | What Across charges to move the funds               |
| App fee      | Your own fee, if you set `appFeeBps`. `0` otherwise |

The total fee is the transfer fee plus the app fee.

What the transfer fee covers [#what-the-transfer-fee-covers]

* **Gas on both chains.** On signature-funded transfers origin gas is
  included, so the user's wallet pays no gas, apart from a one-time Permit2
  approval if one is needed. On approval-funded transfers the wallet pays gas
  for the transactions it sends.
* **Bridge and swap costs**, on routes that use them.
* **The relayer's margin**, set by relayers competing for the order.

Gas is roughly fixed per transfer, so the fee is a larger share of a small
transfer than of a large one. On sponsored routes a subsidy covers part or all
of the transfer fee, so it can be zero or negative.

Where to find it in the API response [#where-to-find-it-in-the-api-response]

The [quote](/api-reference/v1/quotes/post) itemises the fee in its `fee`
object:

| Field            | What it is                                               |
| ---------------- | -------------------------------------------------------- |
| `transferFee`    | The transfer fee                                         |
| `appFee`         | Your app fee                                             |
| `totalFee`       | `transferFee` + `appFee`. Sets the expected delivery     |
| `maxTransferFee` | The most the transfer fee can be                         |
| `maxTotalFee`    | `maxTransferFee` + `appFee`. Sets the guaranteed minimum |

Each entry is in the destination token, with `amount` in base units and
`amountUsd` in USD.

Gas the user's wallet pays itself is not part of the fee. It is listed in
`gasEstimates` with `effect: "paid_by_wallet"`. Entries marked
`included_in_transfer_fee` are already in `transferFee`.

On `exact_output` and `min_output` quotes the fee lands on the input instead:
`origin.amount` is the expected spend, and `origin.maxAmount` is the most the
user can pay.

After the transfer, [`GET /v1/transfers/{orderId}`](/api-reference/v1/transfers/orderid/get)
reports the app fee in `transfer.appFee`.

App fees [#app-fees]

An app fee is your own fee on top of the transfer, paid by the user.

* **Activation.** Contact Across to activate app fees for your integration.
  The **App fees** tab of the integrator portal
  then shows your maximum and the share of each fee Across keeps.
* **Setting it.** Set `appFeeBps` on each quote request, anywhere from `0`
  up to your maximum. It is in basis points of the input value: `10` on a
  1,000 USDC transfer takes 1 USDC.
* **Errors.** Without activation, or above your maximum, the quote returns
  `400 request.invalid_field` with `param: "appFeeBps"`. App fees are not
  available on same-chain swaps.
* **Payout.** Across collects the fee and pays out your share monthly.
  `transfer.appFee.integratorEarningUsd` shows your earning on each
  transfer. A refunded or failed transfer pays no app fee.

Things to know [#things-to-know]

<Callout type="info">
  **The auction sets the final price.** `transferFee` is estimated before
  relayers bid, so the delivered amount can land above `destination.amount`,
  and never below `destination.minAmount`.
</Callout>

* **Quotes expire.** Fees move with gas prices, so read them from a live
  quote and request a new one once `expiresAt` has passed.
* **Missing is not zero.** `amount` or `amountUsd` is absent when it cannot be
  stated, and is never reported as `0` in its place. An empty `gasEstimates`
  does not mean free.
* **The app fee is a maximum on output modes.** On `exact_output` and
  `min_output` quotes the input is not known yet, so `appFee` is sized on the
  most the user can pay.
* **Quotes have a fee limit.** A quote whose fee would exceed it returns
  `400 policy.amount_out_of_range`. The default allows up to 50% of the input;
  set `maxFee` on the request to lower it.
