Payment quote creation method

Log in to see full request history

Quote method

This method allows for the request of a quote that locks in the exchange rate for a provided Fiat-to-Crypto, Crypto-to-Fiat, and Crypto-to-Crypto pairs. The resulting quote is valid for a specified period, enabling the transaction to be executed at the locked-in exchange rate.

❗️

To ensure the security of your integration, signature verification is required for all Public and Private API requests.

More details on how to generate the signature.

Regular Widget Transactions

The quote is calculated for each payment method supported for the given currency pair. Supported currency pairs can be retrieved using the GET Currency Pairs Buy Crypto or GET Currency Pairs Sell Crypto endpoint depending on the transaction flow.

Crypto Acquiring Transactions

The quote is calculated for each supported currency pair. Supported currency pairs can be retrieved using the GET Currency Pairs Swap Crypto endpoint.

  • Fiat-to-Crypto: For transactions where the amount is denominated in fiat currency, the quote is calculated based on the requested_currency and amount fields. These fields represent the fiat amount and currency that should be passed as an equivalent in fiat currency. Paybis handles the conversion between the two cryptocurrencies based on the equivalent of fiat currency.
  • Crypto-to-Crypto: For transactions where both the user's payment and the merchant's payout are denominated in cryptocurrencies, the quote is calculated based on the currencyCodeFrom, currencyCodeTo, and amount fields. These fields represent the user's payment cryptocurrency, the merchant's payout cryptocurrency, and the amount of the user's cryptocurrency being exchanged. Paybis handles the conversion between the two cryptocurrencies.

🚧

Making Requests

This endpoint must be called from your application's backend.

Request examples

{ // Specifies the fiat currency the user will be paying with. "currencyCodeFrom": "USD", // Specifies the cryptocurrency the user wants to buy. "currencyCodeTo": "BTC-TESTNET", // The amount the user wants to spend //(in USD, since directionChange is 'from'). "amount": "10.00", // Indicates that the 'amount' is in the 'currencyCodeFrom'. "directionChange": "from", // Indicates the user wants to know the total cost including fees. "isReceivedAmount": false // (Optional) ID of the specific payment method to be used for this purchase. "paymentMethod": "credit_card" }
{ // Specifies the cryptocurrency the user wants to sell. "currencyCodeFrom": "ETH-SEPOLIA", // Specifies the fiat currency the user wants to receive. "currencyCodeTo": "EUR", // The amount of cryptocurrency the user wants to sell. "amount": "0.005", // Indicates that the 'amount' is in the 'currencyCodeFrom' (ETH-SEPOLIA). "directionChange": "from", // Indicates the user wants to know the total amount of EUR //they'll receive after fees. "isReceivedAmount": false // (Optional) ID of the specific payout method the user wants to use to receive the fiat currency. "payoutMethod": "partnername_bridgerpay_sell_netellerr" //Please replace with your payout ID }
{ // Specifies the fiat currency the user will be paying with. "currencyCodeFrom": "USD", // Specifies the cryptocurrency the user wants to buy. "currencyCodeTo": "LTC-TESTNET", // The amount the user wants to spend //(in USD, since directionChange is 'from'). "amount": "10.00", // Indicates that the 'amount' is in the 'currencyCodeFrom' (USD). "directionChange": "from", // Indicates the user wants to know the total cost including fees. "isReceivedAmount": false, // The promo code the user wants to apply to their purchase. "promoCode": "SALE50" // Replace with the actual promo code }
{ // The fiat amount that the merchant wants to receive "amount": "100", // The fiat currency that the merchant wants to receive "requestedCurrency": "USD", // The cryptocurrency that the customer will pay with "currencyCodeFrom": "ETH-SEPOLIA", // The cryptocurrency that the merchant will receive "currencyCodeTo": "USDT-TRC20-SHASTA", "isReceivedAmount": false, "payoutMethod": "ca-test-sell-ethereum-widget" }
Body Params
string

Fiat currency code in ISO alpha-3 format or crypto asset (i.e. BTC)

string

Fiat currency code in ISO alpha-3 format or crypto asset (i.e. BTC)

string

The amount in the currency specified by either the directionChange or requestedCurrency parameters
represented the payment amount with precision: 2 decimal places for fiat currencies (e.g., 100.12);
and 8 decimal places for cryptocurrencies (e.g., 0.12345678).

string

This field determines the currency in which amount is specified.

A value of from indicates that amount is in the currencyCodeFrom currency. A value of to
indicates that amount is in the currencyCodeTo currency.

This parameter is required if requestedCurrency is not provided. It is mutually exclusive
with requestedCurrency.

string

This field is used in swap-crypto exchanges and crypto-acquiring transactions where the transaction
occurs in a fiat equivalent. This parameter is optional. It specifies the fiat currency in which
amount is denominated.

boolean

Specifies how to process the value in the amount field: with or without fees. False, to set the total
amount that the user will spend. True, to set the net amount of money (excluding fees) for which
the user will get crypto.

string | null

ID of the payment method for which the quote is generated (optional)

string | null

ID of the payout method for which the quote is generated (optional)

string | null

Promo code to be used with transaction

Headers
string

Signature to sign the request. For more information see https://docs.payb.is/reference/signing-requests

string

User IP detected by a public endpoint that uses the current one

Responses

401

API key is missing

403

Invalid API key or access disabled

404

Payment method for quote not found

Language
Credentials
Click Try It! to start a request and see the response here! Or choose an example:
application/json