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

# Get a quote

> Find out how much your customer will receive, and lock in the price.

A quote answers one question: **if my customer sends this much, how much do they get?** Every payment starts with a quote.

## What you send

| Field | What it means | Example |
| - | - | - |
| `customer_id` | The customer this quote is for | `cus_4hT9…` |
| `transaction_type` | `onramp` (fiat → stablecoin) or `offramp` (stablecoin → fiat) | `onramp` |
| `source_amount` | How much your customer sends, as text | `"150000"` |
| `source_currency` | What your customer sends | `NGN` |
| `target_currency` | What your customer receives | `USDC` |
| `network` | The blockchain for the stablecoin | `solana` |
| `payment_method` | **Onramp only.** How your customer pays the fiat | `bank_transfer` |
| `payout_method` | **Offramp only.** How your customer receives the fiat | `momo` |

> [!NOTE]
>
> Send only one of `payment_method` or `payout_method`. An onramp uses `payment_method`, an offramp uses `payout_method`. The stablecoin side is filled in for you. If you leave out `payout_method` on an offramp, we use `bank_transfer`.

## Onramp quote

```bash theme={null}
curl -X POST https://sandbox.core.linkio.world/api/quotes/generate \
  -H "X-BRIDGE-API-Key: $BRIDGE_API_KEY" \
  -H "API-Version: 2026-10-29-atlas" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": "cus_4hT9pL2mQx8VnR3tY7wZ1cB5dE",
    "transaction_type": "onramp",
    "source_amount": "150000",
    "source_currency": "NGN",
    "target_currency": "USDC",
    "payment_method": "bank_transfer",
    "network": "solana"
  }'
```

## Offramp quote

```bash theme={null}
curl -X POST https://sandbox.core.linkio.world/api/quotes/generate \
  -H "X-BRIDGE-API-Key: $BRIDGE_API_KEY" \
  -H "API-Version: 2026-10-29-atlas" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": "cus_4hT9pL2mQx8VnR3tY7wZ1cB5dE",
    "transaction_type": "offramp",
    "source_amount": "100",
    "source_currency": "USDC",
    "target_currency": "GHS",
    "payout_method": "momo",
    "network": "base"
  }'
```

## What you get back

`201 Created`:

```json theme={null}
{
  "status": "success",
  "message": "Quote generated",
  "quote": {
    "id": "qte_9xLp3VnR7tY1wZ4cB6dE8fK2mQ",
    "source_amount": "150000",
    "source_currency": "NGN",
    "target_amount": "97.71",
    "target_currency": "USDC",
    "payment_method": "bank_transfer",
    "payout_method": "stablecoin",
    "network": "base",
    "transaction_type": "onramp",
    "rate": "1535",
    "expires_at": "2026-10-28T10:15:20.000Z"
  }
}
```

| Field | What it means |
| - | - |
| `id` | The quote ID. Use it to create the payment. |
| `target_amount` | How much your customer receives. |
| `rate` | How many units of fiat equal 1 stablecoin. |
| `expires_at` | When the price stops being valid. |
| `processor_fee`, `vat`, `amount_expected` | Sometimes included. When present, `amount_expected` is the exact total your customer must send. |

> [!WARNING]
>
> Quotes last about **20 seconds**. Show the price to your customer, and create the payment as soon as they confirm. See [Time limits](https://docs.bridge.linkio.world/before-you-build/time-limits.md).

## Refresh an expired quote

Refresh the quote before you create the payment if either of these is true:

* The quote has expired (the time in `expires_at` has passed).
* More than 10 seconds have passed since you got the quote.

Refreshing keeps the same quote ID. You get a new price and a new `expires_at`, so check the new price with your customer if it has changed.

```bash theme={null}
curl https://sandbox.core.linkio.world/api/quotes/qte_9xLp3VnR7tY1wZ4cB6dE8fK2mQ/refresh \
  -H "X-BRIDGE-API-Key: $BRIDGE_API_KEY" \
  -H "API-Version: 2026-10-29-atlas"
```

The response looks the same as above, with `"message": "Quote refreshed"`.

## What can go wrong

| Status | Code | Why | What to do |
| - | - | - | - |
| `422` | `validation_failed` | A field is wrong. For example, a currency isn't supported, both currencies are the same, `payment_method` was sent on an offramp, or the amount has too many decimal places. | Read `errors`, fix the field. |
| `422` | `invalid_amount` | The amount is below the minimum or above the maximum. | See [Limits](https://docs.bridge.linkio.world/before-you-build/limits.md). |
| `403` | `pair_not_enabled` | The currency pair isn't turned on for your business. | See [Currency pairs](https://docs.bridge.linkio.world/control-app/ramp-pairs.md). |
| `404` | `customer_not_found` | The customer ID doesn't exist for your business. | Check the ID. |
| `409` | `customer_banned` | The customer is banned. | Contact support. |
| `404` | `quote_not_found` | (Refresh) The quote ID doesn't exist, or it was deleted. | Get a new quote. |
| `409` | `quote_locked` | (Refresh) The quote is used by a payment that has already received the money. | The price is final; nothing to do. |
| `503` | `route_temporarily_unavailable` | We currently don't support this corridor or its in the works. | Try again in a moment or contact support. |
| `504` | `request_timeout` | A quote request took too long to process. | Try again. |

Example of an unsupported method:

```json theme={null}
{
  "error": {
    "type": "validation_error",
    "code": "validation_failed",
    "message": "Request validation failed",
    "request_id": "req_3VnR7tY1wZ4cB6dE8fK2mQ9xLp",
    "status": 422,
    "errors": [
      {
        "field": "payment_method",
        "message": "payment_method momo is not supported for NGN onramp. Allowed: bank_transfer"
      }
    ]
  }
}
```

## Next

Create an [onramp](https://docs.bridge.linkio.world/flows/onramp.md) or an [offramp](https://docs.bridge.linkio.world/flows/offramp.md) with this quote.


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