Quickstart
1
Add the loader
Drop the script anywhere on your page — usually just before
</body>.2
Add a buy button
Give any element a
data-blockra-link attribute set to your payment-link id. The loader wires up the click for you.3
That's it
Clicking opens the checkout in a modal. The buyer enters their email, picks a coin, and pays — then sees a confirmation, all without leaving your site.
Ways to open it
The loader auto-binds any element carrying one of these attributes. Adddata-blockra-theme="light" or "dark" to force a colour scheme.
Programmatic API
Prefer to open it from your own code? CallBlockra.checkout(options):
A single payment-link id (or its full URL). Opens straight to the product.
Several payment-link ids — an array, or a comma-separated string. The buyer picks a product first.
A checkout-session id from
POST /checkout/sessions. Use this for one-time, server-priced charges.Force the checkout’s colour scheme. Omit to follow the buyer’s system preference.
Called once the payment confirms, with
{ sessionId, paymentId }.Called when the buyer closes the modal or drawer.
Blockra.close() to dismiss the current checkout programmatically.
What the buyer sees
- One link (or a session) — the product detail: amount, email, coin selection, then the deposit address.
- Multiple links — a product picker first, then the detail for the chosen one.
- On mobile — the whole thing opens as a bottom drawer instead of a centred modal.
onSuccess is a convenience for updating your UI. Treat the webhook (or a server-side GET /payments/{id}) as the source of truth before fulfilling an order — a browser callback can be missed or spoofed.Branding
Colours and branding are set in your dashboard, not per-embed, so every checkout stays consistent:- Accent colour — set a custom accent (Startup plan and above); it applies to the hosted page and every embed.
- Remove “Powered by Blockra” — hide the footer (Startup plan and above).
theme option only chooses light or dark — it can’t override your accent or remove branding.
Next steps
Create a payment link
Mint the reusable link you embed.
Hosted checkout
The full-page version of the same checkout.
Verify with webhooks
Confirm payments server-side before fulfilling.
Create a session
One-time, server-priced charges.

