Checkout — Overview
The hosted checkout is the page where the buyer actually sends
funds. You don’t render the asset picker, deposit address, or QR
yourself — the SDK opens our page (at
https://checkout.infraio.xyz/<session_key>) and we handle the UI.
Three modes
Centered overlay popup, ~560×780 default. Storefront stays put.
onSuccess fires when the popup closes after payment. Default mode.
Hard navigation to checkout. Best for popup-blocked browsers or
mobile web where overlays feel jarring. Buyer returns via your
success_url / cancel_url from the session.
iframe inside your page. Best when you control layout end-to-end and want zero context switch. Auto-resizes via postMessage.
EmbedPick-a-mode heuristic
| If… | Use |
|---|---|
| Desktop web, default e-commerce | Popup |
| Mobile web | Redirect (popups + mobile = sad) |
| Strict CSP-locked admin panel | Redirect |
| In-app webview / native checkout-in-a-page | Embed |
| You want a fully custom buyer flow with white-label header | Embed + hideHeader + your own wallet connect |
What the buyer sees
Regardless of mode, the page surfaces:
- Order summary (line items, total, currency). Hide with
hideSummaryif you’ve already shown this on your side. - Asset picker — list of chain × asset combinations you’ve enabled in merchant settings. Buyer picks one.
- Deposit address + QR + amount for the chosen combo. The buyer either scans, connects a wallet (WalletConnect button), or pays from a pre-connected wallet you supplied via the SDK.
- Status pulse — “Waiting for transfer”, “Tx detected (3/12 confirmations)”, “Paid”.
- Cancel button (always present) → triggers
onCancel.
Customising the page
| Knob | How | Limits |
|---|---|---|
| Hide order summary | hideSummary: true on SDK | Buyer can still see total in deposit panel |
| Hide InfraIO header | hideHeader: true on SDK | Pair with walletAddress for full white-label |
| Pre-connect a wallet | walletAddress + walletChainId + onSignRequest | Bypasses the WalletConnect modal |
| Locale | locale on SDK — one of en, vi, ja, ko, es, pt-BR, ru, tr, zh-CN, zh-TW | Localises the checkout and refund pages (and the wallet-connect modal). Unknown or omitted → falls back to en |
| Logo, brand color | Merchant dashboard → Branding | Applies globally, not per-session |
Return URL behavior
For redirect mode the buyer always returns to one of:
success_urlfrom the session (on settled payment)cancel_urlfrom the session (on cancel/abandon)- If you didn’t set those, the SDK falls back to the page that
opened the checkout, with
?session_id=…&status=success|cancelappended
For popup and embed modes there’s no navigation — control
returns to your page via onSuccess / onCancel. Use those to
decide what UI to show next.
CSP and embedding
If you use embed mode, your CSP must allow our origin in
frame-src:
Content-Security-Policy:
frame-src https://checkout.infraio.xyz https://checkout-dev.infraio.xyz;The iframe carries the permissions policy allow="payment; clipboard-write"
— it can invoke the Payment Request API and write to the clipboard,
nothing more. It is not HTML-sandboxed: the checkout page is a
full wallet-connecting app whose postMessage security (origin checks on
both sides) and third-party wallet SDKs (WalletConnect, Coinbase,
MetaMask) require a real same-origin scripting context, so an HTML
sandbox attribute would break wallet connect for negligible isolation
gain. Isolation comes instead from the cross-origin boundary, strict
postMessage origin checks, and your frame-src CSP.
Mobile considerations
Popups are blocked aggressively on mobile Safari. If your traffic is
mostly mobile, default to mode: "redirect". The popup overlay also
covers the keyboard area on small screens — fine for amount entry,
awkward for asset picking.
Branding (for the white-label crowd)
Full white-label requires:
hideHeader: trueon the SDKwalletAddresspre-connected (buyer sees no WalletConnect)- Your logo + brand color set in merchant dashboard branding
- (Optional) Custom domain for the checkout page —
pay.your-shop.cominstead ofcheckout.infraio.xyz. Self-serve via dashboard once your CNAME is verified.
What’s next
- SDK → JavaScript — full option reference per mode.
- Concepts → Sessions — what’s happening server-side while the buyer is on the page.
- Concepts → Chains & assets — which chain×asset combinations are available in the picker.