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

# Conversion

> Change asset, chain or currency inside a payment, read the frozen quote, and act when it expires.

Conversion is part of a Payment or an inbound transfer into a reusable [bank funding account](/concepts/on-ramp-accounts). There is no `Conversion` resource and no convert endpoint.

## Conversion applies in three cases

| Situation | What converts |
| - | - |
| The payer holds a different chain or asset than the recipient wants | Crypto to crypto, across chains if needed |
| An off-ramp pays out local currency | Stablecoin to fiat |
| An on-ramp collects local currency | Fiat to stablecoin |

If payer and recipient are already on the same chain and asset, nothing converts and no quote is involved. Crypto-to-crypto routing runs on the supported chains; fiat conversion is limited to the corridors where collection or payout is enabled. [View supported regions and currencies →](/supported-regions-and-currencies)

On a receive payment, the conversion is chosen when the payer selects an option. Selecting it fixes the chain, the asset and the amount the payer owes, and the recipient's amount does not change with how the payer funds it.

## Read the quote where it appears

There is no quote resource. A quote is a frozen rate with a deadline, and it appears in two places.

| Where | Fields | Expiry |
| - | - | - |
| On a payment option | `sourceAmount`, `payerAmount`, `recipientAmount`, `providerFee` | `expiresAt`, the effective payer deadline |
| On an external fiat send | `funding.exchangeRate`, with `rate`, `baseAssetCode`, `quoteAssetCode` | `funding.quoteExpiresAt` |

Where a quote has a deadline, the funding window ends at the earlier of the Payment’s `expiresAt` and the quote’s expiry. Show the returned figures. Refresh a checkout option only when eligible and no payment evidence has been observed.

The US linked-bank route fixes the crypto input without locking a USD rate. Its final USD delivery and conversion costs are known only at settlement; do not display a guaranteed dollar amount.

## Handle an expired quote by where it lived

Both cases return `payment_quote_expired`. What you do next differs.

| Expired quote | Do this |
| - | - |
| A payment option at checkout | When `refreshable` is true and no payment evidence has been observed, refresh the option on the existing payment with `POST /v2/public/payments/{paymentId}/options/{optionId}/refresh`. Do not create a new payment |
| `funding` on a fiat send | The quote cannot be refreshed. Read the original Payment and reconcile any funds sent. A new attempt requires a terminal original Payment and a new idempotency key. See [Sending payments](/payments/sending-payments#fund-a-fiat-send-before-its-quote-expires) |

## Preview a send before anything exists

`POST /v2/payments/preview` resolves the destination, the fee and the funding options with no financial side effect. **It covers only `upa`, `payment_handle` and `crypto_wallet` send destinations.** External fiat sends resolve funding terms at creation; receive Payments expose payer options after creation.

```bash theme={null}
curl -X POST https://staging-api-v2.stableyard.fi/v2/payments/preview \
  -u "$APP_ID:$APP_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "intent": "send",
    "sender": { "accountId": "acct_123" },
    "destination": { "type": "payment_handle", "paymentHandle": "alice@partner" },
    "paymentAmount": { "amount": "100.00", "assetCode": "USDC" }
  }'
```

<Card title="Next: Fees" icon="percent" href="/payments/assessing-fees">
  How each fee is set, frozen onto a payment and deducted once.
</Card>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.