Creates a quote for a crypto payout and returns its price and expiration time.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Requests a price quote for a planned transaction. Returns the exchange rate, estimated fees, and expected output amount based on the provided input parameters. Use this endpoint to show users the cost breakdown and expected outcome before they confirm a transaction.
Overview
This method allows for the request of a quote that locks in the exchange rate for a provided currency pair. It supports two directions:
- Buy (Payouts): Fiat-to-Crypto. You pay Fiat from your balance to send Crypto to a user.
- Sell (Pay-ins): Crypto-to-Fiat. A user sends Crypto to you, which is converted to Fiat and credited to your balance.
You can create a quote based on either the fiat amount or the crypto amount. The resulting quote is valid for a specified period, enabling the transaction to be executed at the locked-in exchange rate.
Important Notes
direction: This field determines the operation type.
- Use
buyfor Payouts (Send Crypto).- Use
sellfor Pay-ins (Receive Crypto).fiat_currency: Currently only accepts "EUR" or "USD". Other values will cause an error.requested_currency: Determines the base currency for calculation. It must match either thefiat_currencyorcrypto_currencyvalue.requested_amount_type: Defaults tofrom. Iftois passed, fees are calculated on top of thefiat_money.
Payouts (direction: buy)
buy)Used when sending funds to a user.
-
Fiat-Based Quotes: If you create a quote with a fiat amount (e.g., "USD 100"), this exact amount will be deducted from your prefunding balance. The user will receive the corresponding amount of cryptocurrency, minus any applicable fees.
- Example: A customer wants to withdraw 1000.00 EUR from their platform balance in Bitcoin. You create a quote for 1000.00 EUR. Paybis calculates the equivalent BTC to send to the user.
-
Crypto-Based Quotes: If you create a quote with a crypto amount (e.g., "BTC 0.01"), the user will receive this exact amount. The corresponding fiat value, plus fees, will be deducted from your prefunding balance.
- Example: You want to pay a vendor exactly 0.01 BTC. You create a quote for 0.01 BTC. Paybis calculates the total EUR cost to deduct from your balance.
Pay-ins (direction: sell)
sell)Used when receiving funds from a user.
-
Fiat-Based Quotes: You specify the exact fiat amount you wish to receive into your ledger (e.g., "EUR 100"). The system calculates the required crypto amount the user must send to settle this value.
- Example: A user wants to top up their account by exactly 100 EUR. You request a quote for 100 EUR. Paybis tells you exactly how much ETH the user must deposit.
-
Crypto-Based Quotes: You specify the exact crypto amount the user intends to deposit (e.g., "BTC 0.05"). The system calculates the estimated fiat amount that will be credited to your ledger after conversion.
- Example: A user has 0.05 BTC and wants to deposit it all. You request a quote for 0.05 BTC. Paybis shows you the EUR value that will be credited to your balance upon receipt.
Request
POST /v1/quote
| Parameter | Type | Location | Required | Description |
|---|---|---|---|---|
Authorization | string | Header | Yes | Your API key. |
X-Request-Signature | string | Header | Yes | Signature of the request body. See Signing Requests. |
quote_id | uuid | Body | Yes | Partner-generated identifier of a specific quote in UUID format. |
direction | string | Body | Yes | Quote direction. Allowed values are: buy / sell. |
crypto_currency | string | Body | Yes | Crypto asset code. |
fiat_currency | string | Body | Yes | Fiat currency code (EUR/USD). |
requested_currency | string | Body | Yes | Base crypto or fiat currency for quote calculation. |
requested_amount | string | Body | Yes | Requested amount with precision 2 for fiat and 8 for crypto. |
requested_amount_type | string | Body | No | Allowed values are: from / to. |
Request example
{
"quote_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"direction": "sell",
"crypto_currency": "BTC",
"fiat_currency": "USD",
"requested_currency": "BTC",
"requested_amount": "0.12345678",
"requested_amount_type": "from"
}Response
| Field | Type | Description |
|---|---|---|
status | string | Request status. |
result.quote_id | string | Identifies a specific quote. |
result.digital_money | object | Crypto side of the quote: amount and currency. |
result.fiat_money | object | Fiat side of the quote: amount and currency. |
result.time | string (date-time) | Quote creation timestamp. |
result.expiration | string (date-time) | Quote expiration timestamp. Execute before this time. |
result.fees.network_fee | object | Blockchain network fee: amount and currency. |
result.fees.service_fee | object | Paybis service fee. Includes the partner fee, which is listed separately under breakdown for information only. Do not add breakdown amounts on top of this value. |
result.fees.service_fee.breakdown.partner_fee | object | Partner fee in fiat currency. Always present; 0.00 when the partner has no commission configured. |
result.fees.total_fee | object | Total fee: amount and currency. |
result.fees.fee_discount | object or null | Fee discount, if any. |
result.exchange_rate_fiat_to_crypto | object | Exchange rate for the pair: from, to, rate. |
result.exchange_rate_crypto_to_fiat | object | Exchange rate for the pair: from, to, rate. |
result.fiat_equivalent | object or null | Fiat equivalent of the quote, when available. null otherwise. |