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

# Rates, quotes and fees

> Indicative rates, locked quotations, the fees breakdown and risk parameters.

## Rate or quotation

| | Fetch rate | Quotation |
| - | - | - |
| Endpoint | `GET /payin/fetch-rate`, `GET /payout/fetch-rate` | `POST /payin/quotation`, `POST /payout/quotation` |
| Price | Indicative. It can change at any moment | Locked until `expiry_time` |
| Creates an object | No | Yes. Use its `id` to initiate |
| Use it for | A live price in your UI while the user types | The confirm screen, right before the user pays |

Fetch a rate as often as your UI needs. Create a quotation only when the user is ready to pay.

## Fetch a rate

All inputs are query parameters.

```http theme={null}
GET /pos/api/v1/payout/fetch-rate?asset=USDT&fiat=INR&network=tron&payment_method=IMPS
```

```json theme={null}
{
  "asset": "USDT",
  "fiat": "INR",
  "rate": 87.2,
  "network": "TRON",
  "fees": { "imps": { "type": "banking_fee", "value": 10, "unit": "flat" } }
}
```

* `rate` is the amount of fiat per 1 unit of crypto, with fees included.
* `network` is required. Pick it from `supported_networks` in the configuration.
* Payout: `payment_method` is required. For corridors priced by amount (most non-INR fiats), also send exactly one of `sending_amount` or `receiving_amount`.
* Payin: for USD, also send `payment_method` and `sending_amount`.
* `fees` lists the bank's fee per payment method, for display only. It isn't applied to `rate`. `unit` is `flat` or `percentage`.

## Quotations

A quotation locks the rate and fees for one order.

* **Expiry.** Read `expiry_time` from each response. It's usually 10 minutes. Initiate before it passes, and create a new quotation after it.
* **Single use.** One quotation creates one order. After that, it's `LINKED` and you can't use it again.
* **Amount.** Payin quotations take `sending_amount` in fiat. Payout quotations take `sending_amount` in crypto or `receiving_amount` in fiat, never both. Remittance quotations follow the payout rule.
* **Status.** `UNLINKED` (new), `LINKED` (used by an order) or `EXPIRED`. Fetch a quotation by ID to check it.

## The fees object

Every quotation and order returns a `fees` breakdown. Show the user the quotation's `receiving_amount`, not your own calculation.

| Key | Meaning |
| - | - |
| `client_fee_fiat`, `client_fee_crypto` | Your fee (the markup set for your organization), in fiat and in crypto |
| `client_gst_fiat`, `client_gst_crypto` | GST on your fee |
| `zapyd_fee`, `zapyd_gst` | Zapyd's fee and the GST on it |
| `pg_fee`, `pg_gst` | Payment gateway fee and the GST on it |
| `tds` | Tax deducted at source, where Indian rules require it |
| `gross_effective_exchange_rate` | The rate the user actually gets after every fee |

<Note>
  Fee values depend on your pricing. Contact [partnerships@zapyd.com](mailto:partnerships@zapyd.com) to change your client fee.
</Note>

## Risk parameters

Quotations need `risk_parameters`. The configuration endpoint lists the keys your organization must send in `required_risk_parameters`.

| Key | Value |
| - | - |
| `ip_address` | The end user's IP address, not your server's |
| `device_id` | A stable device identifier from your app |
| `suspicious_activity_report` | Whether you've filed a suspicious activity report on this user |
| `law_enforcement_agency_report` | Whether a law enforcement request involves this user |

Remittance quotations take an empty object: `"risk_parameters": {}`.
