Quotes

Understanding Quotes

A Quote is a locked exchange rate between two currencies — fiat and stablecoin, or fiat and fiat — valid for a short window of time. Every transaction that involves a currency conversion requires a quote to be created first.

Quotes exist to give both you and your customers rate predictability: the price agreed upon at quote time is the price used when the transaction is executed, as long as the quote has not expired.


How quotes work

When you create a quote, UnblockPay returns:

  • A unique id to reference in the subsequent transaction request
  • The quotation — the exchange rate locked for that quote
  • An expires_at timestamp indicating when the rate expires

Quotes are valid for 5 minutes. If the transaction is not initiated within that window, the quote expires and a new one must be created.

A quote does not reserve funds or commit to any transaction. It only locks a rate. The transaction is only created when you call the corresponding transaction endpoint with the quote_id.

Specifying the amount

When creating a quote, you can optionally provide an amount on either the sender or the receiver side — but not both.

  • Amount on the sender side — fixes how much is being sent. The quote returns how much the receiver will get.
  • Amount on the receiver side — fixes how much the receiver should get. The quote returns how much the sender needs to send.
  • No amount — the quote returns only the exchange rate. The amount is specified when initiating the transaction.

For fiat to fiat quotes, the same logic applies across both legs. The sender_quotation reflects the fiat A → stablecoin rate, and the receiver_quotation reflects the stablecoin → fiat B rate.


Quote types

UnblockPay supports two quote endpoints depending on the transaction type:

Endpoint Used for
POST /v1/quote Pay-in (fiat → stablecoin) and Payout (stablecoin → fiat)
POST /v1/quote/fiat-to-fiat Fiat to fiat (fiat A → stablecoin → fiat B)

Wallet transfers do not require a quote.


Partner fees

Quotes support an optional partner_fee object, which lets you apply a markup on top of UnblockPay's base rate. You can configure:

  • percentage_fee — a fee in basis points (e.g. 150 = 1.5%)
  • flat_fee — a fixed amount deducted from the transaction

Partner fees are applied at quote time and reflected in the final amounts received by the customer.


API endpoints

  • POST /v1/quote — Create a quote for pay-in or payout
  • POST /v1/quote/fiat-to-fiat — Create a quote for a fiat to fiat transaction

For the full schema and request/response details, see the API Reference .