# Quotes

A quote locks in an exchange rate and fee breakdown for a cross-currency transfer. Quotes are valid for a fixed period from creation. Use the returned quote `id` when creating a payout to guarantee the quoted rate and fees.

The `POST /quotes` endpoint prices both payouts and payins. This page focuses on the payout flow.

## How quotes work

1. **Request a quote** — Provide the `resource` (`payout`), the currency pair, an amount, and a `method`. Specify either the source amount or destination amount (not both).
2. **Review available options** — For a payout, `local_transfer` to an INR destination returns one quote per rail (`upi`, `imps`, `neft`, `rtgs`); `swift_transfer` returns a single SWIFT quote. Each quote in the response carries its own `method.payment_rail`.
3. **Use the quote** — Provide the quote `id` as `quote_id` in the relevant request: payins (payment links and orders) and payouts.


## Key details

| Detail | Value |
|  --- | --- |
| **Quote validity** | A fixed period from creation |
| **Resource** | `payout` or `payin` |
| **Amount specification** | Either `source_amount` or `destination_amount`, not both |
| **Amounts format** | In cents |
| **Payment method** | `bank_transfer` or `pay_via_bank` |
| **Subtype** | `local_transfer` or `swift_transfer` |
| **Payment rails (derived)** | `upi`, `imps`, `neft`, `rtgs`, `swift` |


## Example request

```bash
curl -X POST https://api.glomopay.com/api/v1/quotes \
  -H "Authorization: Bearer <your_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "resource": "payout",
    "source_currency": "USD",
    "destination_currency": "INR",
    "source_amount": 10000,
    "method": {
      "payment_method": "bank_transfer",
      "subtype": "swift_transfer"
    }
  }'
```

## Example response

```json
{
  "quotes": [
    {
      "id": "quote_3m4n5o6p7q",
      "resource": "payout",
      "expires_at": "2026-06-12T08:16:50Z",
      "method": {
        "payment_method": "bank_transfer",
        "subtype": "swift_transfer",
        "payment_rail": "swift"
      },
      "source_currency": "USD",
      "destination_currency": "INR",
      "fx_rate": 90.0,
      "source_amount": 10000,
      "destination_amount": 882000,
      "fees": {
        "txn_fee": {
          "currency": "USD",
          "amount": 100
        },
        "fx_fee": {
          "currency": "USD",
          "amount": 100
        }
      }
    }
  ]
}
```

## Fees breakdown

Each quote includes a detailed fee breakdown:

- **Transaction fee (`txn_fee`)** — Fixed fee charged per transaction.
- **FX fee (`fx_fee`)** — Fee applied on top of the exchange rate for currency conversion.
- **Referral fee (`referral_fee`)** — Payin only; present when a referral `price_id` was applied.


All fees are expressed in the smallest unit of the fee currency.