Skip to main content
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.
Exact-in
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

Enter how much USDC to send. Crossmint calculates the MXN payout.

Exact-out
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

Enter how much MXN to receive. Crossmint calculates the USDC deposit.

Before You Start

Both modes use 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":
In this example, the quote returns:
Quote excerpt
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":
The quote tells you how much USDC to deposit:
Quote excerpt
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.
  • 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 for how to send it, and the Create Order reference 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 for expired quotes, including cases where a deposit is already in flight.

See Also

Create Order

Request and response fields for creating an offramp order.

Manage Orders

Track payouts and handle expired quotes or payment issues.