Embed the payment page
Three ways to put the invoice UI in front of your customer — hosted, iframe, or fully custom.
You have three options for showing the payment page to a buyer.
1. Link to the hosted page (fastest)#
After creating an invoice, send the buyer to the platform-hosted payment URL included in the invoice response. No frontend work on your side.
Pros: zero UI code to maintain; the platform handles QR rendering, state polling, expiry countdown, and fallbacks per network. Cons: the customer briefly leaves your domain.
2. Embed via iframe#
Render the hosted page inside an <iframe> on your checkout.
<iframe
src="https://pay.example.com/i/<invoice-id>"
width="100%"
height="560"
style="border: 0;"
title="Pay with crypto"
></iframe>
Pros: brandable surround; still no payment UI code on your side. Cons: iframes complicate accessibility, analytics, and some browsers restrict third-party cookies inside them.
3. Fully custom UI (most control)#
Call POST /api/invoices from your backend, render the QR yourself using deposit_address + crypto_amount + crypto_network, then poll GET /api/invoices/{id} until a terminal state.
Pros: complete visual and behavioural control. Cons: you re-implement payment URIs, QR rendering, the expiry countdown, and state polling.
What you need#
- A QR library (any will do — the encoded payload is a URI string, not a bitmap).
- A polling loop, 2–5 seconds cadence, that stops once the invoice reaches a terminal state.
- A safe amount conversion (string-based, not floating-point) — see Payment URIs.
See also#
- Dashboard → Test payment — scannable working example.
- Create an invoice via API.