Skip to content

Setting a quote expiry

By default, checkout sessions use BTC Direct’s standard quote validity window. The expireTime parameter lets you shorten that window if you want the user to act faster.

Pass expireTime as the number of seconds the quote should remain valid:

{
"baseCurrency": "BTC",
"quoteCurrency": "EUR",
"paymentMethod": "creditCard",
"quoteCurrencyAmount": 50,
"walletAddress": "bc1...",
"expireTime": "300"
}

In this example, the user has 300 seconds (5 minutes) to complete the checkout before the quote expires.

If the user does not complete the checkout within the expiry window, the checkout URL becomes invalid. The user sees an expiry message on the BTC Direct checkout page.

To start a new checkout, your integration must create a new checkout session.