Skip to main content
Blockra’s embeddable checkout drops your crypto checkout straight onto your own site. Add one script tag and a button — when a buyer clicks, the checkout opens in a modal (a bottom drawer on mobile) and they pay in place, without leaving your page. As always, funds settle directly into your own wallet; Blockra never holds them. It’s the same checkout as the hosted page, rendered inline. Start from a payment link (reusable) or a checkout session (one-time).

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. Add data-blockra-theme="light" or "dark" to force a colour scheme.

Programmatic API

Prefer to open it from your own code? Call Blockra.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.
session
string
A checkout-session id from POST /checkout/sessions. Use this for one-time, server-priced charges.
theme
"light" | "dark"
Force the checkout’s colour scheme. Omit to follow the buyer’s system preference.
onSuccess
function
Called once the payment confirms, with { sessionId, paymentId }.
onClose
function
Called when the buyer closes the modal or drawer.
Call 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).
The theme option only chooses light or dark — it can’t override your accent or remove branding.
Load blockra.js from https://checkout.blockra.io. The loader and the iframe it opens must share an origin, so don’t self-host or proxy the script.

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.