> ## Documentation Index
> Fetch the complete documentation index at: https://developers.circle.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How upfront fees work

> Learn how CCTP collects upfront fees and completes Fast Transfer and Forwarding Service transfers.

Paying fees upfront starts with requesting a signed fee quote from Circle, then
submitting that quote with the burn in a single transaction on the source
blockchain. Circle honors the quoted price, so the recipient receives the full
transferred amount. For a full walkthrough, see
[Transfer USDC with upfront fees](/cctp/howtos/transfer-usdc-with-upfront-fees).

## Transfer flow with upfront fees

```mermaid theme={null}
sequenceDiagram
    actor User
    participant API as Quote API
    participant USDC as USDC token
    participant TMWF as TokenMessengerWithFees
    participant CCTP as TokenMessengerV2
    participant Circle as Circle

    User->>API: Request fee quote
    API-->>User: Signed, time-bound quote
    User->>USDC: approve(TMWF, amount [+ fee])
    User->>TMWF: depositForBurnWithFees (quote + fee)
    TMWF->>TMWF: Verify quote and collect fee
    TMWF->>CCTP: depositForBurn
    CCTP-->>Circle: Burn message emitted
    Circle-->>User: Full amount minted on destination
```

<Steps>
  <Step title="Request a quote">
    Request an [upfront fee quote](/cctp/concepts/upfront-fee-quotes) from the
    [Quote API](/api-reference/cctp/all/create-usdc-burn-quote) for the fees you
    want to pay upfront: the Forwarding Service fee, the Fast Transfer fee, or
    both. See [Paying the fee](#paying-the-fee) for the available fee tokens.
  </Step>

  <Step title="Receive a signed quote">
    Circle returns a signed, time-bound quote that prices each fee and includes a
    `signedQuote` blob.
  </Step>

  <Step title="Approve USDC">
    Approve
    [`TokenMessengerWithFees`](/cctp/references/contract-interfaces#tokenmessengerwithfees)
    to spend the USDC amount you're transferring, plus the quoted fee if you're
    paying it in USDC. The contract pulls the transfer amount for the burn and, if
    applicable, the fee amount.
  </Step>

  <Step title="Submit the burn">
    Call `depositForBurnWithFees` (or `depositForBurnWithHookAndFees`) on
    `TokenMessengerWithFees`, passing the signed quote along with the standard
    `depositForBurn` parameters, and pay the quoted fee amount: attach it as the
    transaction's native value, or rely on the USDC approval from the previous
    step.
  </Step>

  <Step title="Fee is collected and tokens are burned">
    The contract verifies the quote, collects the fee, and then delegates to
    `TokenMessengerV2` to complete the CCTP burn.
  </Step>

  <Step title="Full amount is minted">
    Circle attests the transfer with no fee deducted at mint, and the full amount
    is minted to the recipient.
  </Step>
</Steps>

## Paying the fee

The token you selected on the quote request decides where the fee comes from:

* **Native gas token** (default): attach the quoted amount as the transaction's
  native value.
* **USDC**: request the quote with `feeToken` set to the USDC address, then
  approve `TokenMessengerWithFees` to spend the quoted fee before you submit.
  This fee approval is on top of the USDC you're transferring, so approve the
  transfer amount plus the quoted fee.

## Forwarding with upfront fees

When a quote includes a `FORWARD` fee, the transfer is forwarded on the
destination blockchain the same way as any other
[Forwarding Service](/cctp/concepts/forwarding-service) transfer, except that
the forwarding fee isn't deducted from the transferred amount. What changes is
how you supply the hook data.

Forwarding requires a valid `cctp-forward` hook in the submitted hook data.
[`depositForBurnWithFees`](/cctp/references/contract-interfaces#depositforburnwithfees)
builds this hook for you automatically, as long as you request the quote without
passing `hookData`. For custom hook data, use
[`depositForBurnWithHookAndFees`](/cctp/references/contract-interfaces#depositforburnwithhookandfees)
and submit the same `hookData` you used to request the quote. For the hook
structure, including how to append your own frame, see
[Forwarding Service hook format](/cctp/concepts/forwarding-service#hook-format).
