Skip to content

Requesting a quote

Before redirecting your user to the checkout, you can request a quote to show pricing information in your own UI. This is useful if you want to display the exchange rate, fees, or total cost before the user leaves your platform.

Before requesting a quote, you need:

  1. A valid JWT token. See Quick start: step 1 for how to authenticate.
  2. The payment method the user wants to use. See Retrieving payment methods to get available methods.
  3. The currency pair. See Retrieving supported currencies to get available pairs.
  1. Your backend calls the quote endpoint with the currency pair, amount, and payment method.
  2. The API returns a quoted price including fees, exchange rate, and an expiry time.
  3. You display this information to the user in your UI.
  4. If the user accepts, you create a checkout session using the quick start flow.

POST /api/v1/buy/quote

FieldDescription
currencyPairThe currency pair (e.g. BTC-EUR). Use the value from the currency pairs endpoint.
paymentMethodThe payment method code (e.g. iDeal, creditCard). Use the value from the payment methods endpoint.

You must also provide one of:

FieldDescription
fiatAmountThe amount in fiat the user wants to spend.
cryptoAmountThe amount of crypto the user wants to buy.
Terminal window
curl -X POST https://api-sandbox.btcdirect.eu/api/v1/buy/quote \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"currencyPair": "BTC-EUR",
"paymentMethod": "iDeal",
"fiatAmount": 100
}'
Try it out

Request a quote for a fiat-to-coin order. Requires a valid JWT token.

{
"currencyPair": "BTC-EUR",
"fiatAmount": 100,
"cryptoAmount": 0.00123456,
"paymentMethodCost": 0.50,
"networkFeeCost": 1.25,
"btcdirectFee": 2.00,
"btcdirectFeePercentage": 2.0,
"partnerFee": 0.50,
"partnerFeePercentage": 0.5,
"totalCost": 100,
"singleCoinEstimate": 81000.00,
"paymentMethod": "iDeal",
"expiryDate": "2026-04-13T12:00:00Z"
}

The expiryDate indicates when the quote is no longer valid. After this time, you must request a new quote.

See the endpoint specification for the full request and response schema.