Skip to main content
Creates a Blockra-hosted checkout session and returns a URL to redirect your buyer to. On the hosted page the buyer picks which coin to pay with, sees the deposit address and exact amount, and is sent to your success_url once the payment confirms. Requires the payments:write scope.

Request

POST https://api.blockra.io/checkout/sessions

Body parameters

amount
number
required
The amount to charge, in fiat. Blockra locks the live exchange rate once the buyer picks a coin. Example: 9.99.
currency
string
default:"USD"
The fiat currency to price in. One of USD, EUR, or GBP. Defaults to your account’s settlement currency.
label
string
A short description shown on the checkout page (max 255 characters).
reference
string
Your own order or reference ID (max 255 characters). Echoed back on the resulting payment and in webhook payloads.
customer_email
string
Pre-fills the buyer’s email and associates the payment with a customer record.
success_url
string
URL to redirect the buyer to after a successful payment. Falls back to your checkout settings when omitted.
cancel_url
string
URL to redirect the buyer to if they cancel. Falls back to your checkout settings when omitted.

Response

Returns a 201 with the session ID and the hosted checkout URL. Redirect your buyer to url.
id
string
The checkout session ID, prefixed cs_.
url
string
The hosted checkout page URL — redirect your buyer here.