Quote method
This method allows for the request of a quote that locks in the exchange rate for a provided Fiat-to-Crypto pair with the possibility to create a quote based on either fiat or 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
fiat_currency
field currently only accepts "EUR" or "USD". Other values will cause an error.requested_currency
field determines the direction of the quote. It should match either thefiat_currency
orcrypto_currency
value.- Coming Soon API will return specific fee amounts in separate fields for better transparency.
Use Cases
- 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. This approach ensures that a fixed fiat amount will be deducted from your prefunding balance, while the user receives the equivalent in crypto.
Example: A customer on the partner's platform has a balance of 1000.00 EUR and wants to withdraw this amount in Bitcoin. The partner would create a quote with a fiat amount of 1000.00 EUR, and Paybis would calculate the equivalent amount of Bitcoin to be sent to the user after deducting fees.
- Crypto-Based Quotes: If you create a quote with a crypto amount (e.g., "BTC 0.01"), the user will receive this exact amount in cryptocurrency. The corresponding fiat value, including any fees, will be deducted from your prefunding balance. This approach is useful when you want to send a specific amount of cryptocurrency, regardless of its fiat value at the time of the transaction.
Example: A partner wants to pay a user a fixed amount of 0.01 Bitcoin. The partner would create a quote with a crypto amount of 0.01 BTC, and Paybis would deduct the equivalent fiat value, including fees, from the partner's prefunding balance.
{
// Unique identifier for the quote (UUID format)
"quote_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
// Cryptocurrency code (BTC, USDT (ERC20), USDT-TRC20, USDT-Polygon are available)
"crypto_currency": "BTC",
// Fiat currency code (USD or EUR are available)
"fiat_currency": "USD",
// Base currency for calculation (BTC in this case)
"requested_currency": "BTC",
// Requested amount (8 decimal places for crypto)
"requested_amount": "0.12345678"
}