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

# Send or Receive an Exact Amount

> Choose an exact stablecoin amount to send or an exact fiat amount to receive

Use `exact-in` when you know how much stablecoin you want to send. Use `exact-out` when you know how much fiat should reach the bank account. Crossmint calculates the other amount and includes both in the quote.

<Columns cols={2}>
  <div>
    **Exact-in**

    <Frame type="simple" caption="Enter how much USDC to send. Crossmint calculates the MXN payout.">
      <img src="https://mintcdn.com/crossmint/qknnLLzgooMPF7RV/images/offramp/exact-amount/exact-in-you-send.jpg?fit=max&auto=format&n=qknnLLzgooMPF7RV&q=85&s=7be7a1a8c137f01bb4c7b50f0cb4f911" alt="Withdraw screen in exact-in mode: the You send card is highlighted with 3.156456 USDC entered, and the You receive card shows the computed 53.27 MXN payout" width="1587" height="948" data-path="images/offramp/exact-amount/exact-in-you-send.jpg" />
    </Frame>
  </div>

  <div>
    **Exact-out**

    <Frame type="simple" caption="Enter how much MXN to receive. Crossmint calculates the USDC deposit.">
      <img src="https://mintcdn.com/crossmint/qknnLLzgooMPF7RV/images/offramp/exact-amount/exact-out-you-receive.jpg?fit=max&auto=format&n=qknnLLzgooMPF7RV&q=85&s=2acdc171f258548cffa76a59bf8c55a3" alt="Withdraw screen in exact-out mode: the You receive card is highlighted with 53.26 MXN entered, and the You send card shows the computed 3.16 USDC deposit" width="1587" height="948" data-path="images/offramp/exact-amount/exact-out-you-receive.jpg" />
    </Frame>
  </div>
</Columns>

## Before You Start

Both modes use [Create Order](/offramp/api-reference/create-order). Set `payment.currency` to the stablecoin being sent, such as `"usdc"`, and `lineItems.currencyLocator` to the payout currency, such as `"fiat:mxn"`.

Choose the mode with `lineItems.executionParameters.mode`. Pass `executionParameters.amount` as a decimal string, such as `"300"` or `"4500.50"`. The mode determines its currency and allowed precision:

* `exact-in`: the stablecoin amount to send. Use up to the token's supported decimal places, which is 6 for USDC.
* `exact-out`: the fiat amount to receive. Use up to the currency's minor unit, which is 2 decimal places for MXN, USD, EUR, and COP. For MXN, `"4500.50"` is accepted; `"4500.505"` returns a 400 error.

## Exact-in: Send an Exact Amount

To cash out 300 USDC into MXN, use `exact-in` with an amount of `"300"`:

```json {11,12} theme={null}
{
  "recipient": { "paymentMethodId": "<paymentMethodId>" },
  "payment": {
    "method": "solana",
    "currency": "usdc",
    "payerAddress": "<payerAddress>"
  },
  "lineItems": {
    "currencyLocator": "fiat:mxn",
    "executionParameters": {
      "mode": "exact-in",
      "amount": "300"
    }
  }
}
```

In this example, the quote returns:

```json Quote excerpt {6,9,13} theme={null}
{
  "lineItems": [
    {
      "quote": {
        "charges": {
          "fees": { "amount": "0.24", "currency": "usdc" }
        }
      },
      "quantity": 5061
    }
  ],
  "quote": {
    "totalPrice": { "amount": "300", "currency": "usdc" }
  }
}
```

The payer sends 300 USDC. After the 0.24 USDC fee, 299.76 USDC is converted into 5,061 MXN for the bank account. Fiat payouts are rounded to the currency's minor unit, which is two decimal places for MXN.

## Exact-out: Receive an Exact Amount

To have the bank account receive exactly 4,500 MXN, use `exact-out` with an amount of `"4500"`:

```json {11,12} theme={null}
{
  "recipient": { "paymentMethodId": "<paymentMethodId>" },
  "payment": {
    "method": "solana",
    "currency": "usdc",
    "payerAddress": "<payerAddress>"
  },
  "lineItems": {
    "currencyLocator": "fiat:mxn",
    "executionParameters": {
      "mode": "exact-out",
      "amount": "4500"
    }
  }
}
```

The quote tells you how much USDC to deposit:

```json Quote excerpt {6,9,13} theme={null}
{
  "lineItems": [
    {
      "quote": {
        "charges": {
          "fees": { "amount": "0.2128", "currency": "usdc" }
        }
      },
      "quantity": 4500
    }
  ],
  "quote": {
    "totalPrice": { "amount": "266.2128", "currency": "usdc" }
  }
}
```

The payout requires 266 USDC, plus a 0.2128 USDC fee. The payer deposits 266.2128 USDC, and the bank account receives 4,500 MXN.

Use `quote.totalPrice.amount` to fund the order. In this mode, the `amount` in your request is the fiat payout.

## Reading the Quote

Use these three fields to show the user how much they will send, how much they will receive, and the fee. Paths start inside the `order` object returned by Create Order and [Get Order](/offramp/api-reference/get-order).

* `quote.totalPrice.amount`: stablecoin to send, including the Crossmint fee.
* `lineItems[].quantity`: fiat the bank account will receive, in the payout currency.
* `lineItems[].quote.charges.fees.amount`: the Crossmint fee, in the stablecoin.

`quantity` is a JSON number; the other amounts are strings. Use `quote.totalPrice.amount` for the deposit. The per-unit price in `charges.unit.amount` is rounded, so multiplying it by `quantity` may give a different total.

The prepared transaction represents the deposit in token base units. See the [REST API quickstart](/offramp/quickstarts/rest-api) for how to send it, and the [Create Order reference](/offramp/api-reference/create-order) for the full schema.

## Fees

With `exact-in`, the fee comes out of the deposit. With `exact-out`, it is added to the stablecoin needed for the payout. In both cases, the total deposit already includes the Crossmint fee.

Network gas is separate from the quoted deposit. The payer wallet pays it in the chain's native token unless the transaction is sponsored.

## Rate Lock

The quote locks the exchange rate for about 10 minutes. To keep the quoted amounts, the deposit must be confirmed on-chain before `quote.expiresAt`. If no deposit arrives in time, the order expires and you create a new order to get a fresh quote. If your flow can take longer, such as waiting for user authorization or KYC, create the order only when the payer is ready to deposit.

See [Manage Orders](/offramp/guides/manage-orders#troubleshooting) for expired quotes, including cases where a deposit is already in flight.

## See Also

<CardGroup cols={2}>
  <Card title="Create Order" icon="code" href="/offramp/api-reference/create-order">
    Request and response fields for creating an offramp order.
  </Card>

  <Card title="Manage Orders" icon="list-check" href="/offramp/guides/manage-orders">
    Track payouts and handle expired quotes or payment issues.
  </Card>
</CardGroup>
