Set a custom top-up.
Enter any supported amount. The playground validates it server-side before creating checkout.
The amount is locked into the server-created checkout session.
Sandbox/01
Bring stablecoins and future payment methods into one consistent checkout, hosted by Paybytoken or embedded in your product.
Compare checkout modes
One server-created payment session powers either experience. Compare the customer journey before choosing how to integrate.
Live test flow
No real fundsPrepared order
$52.00USD
Customer experience
Embedded
Checkout stays inside the merchant experience.
Hosted
Redirect to a Paybytoken-hosted payment page.
Interactive sandbox
Set a top-up amount or use a prepared cart. You’ll choose hosted or embedded checkout next.
Enter any supported amount. The playground validates it server-side before creating checkout.
The amount is locked into the server-created checkout session.
03Prepared orders
Start with the multi-item bundle or choose a fixed-price product. Names, quantities, and prices carry into checkout exactly as prepared.
Three products become three immutable checkout line items, with quantities and prices preserved for the customer.
Future Sight
Qty 1 · $12.00
Violet EX
Qty 1 · $16.00
Battle Partners Pack
Qty 1 · $24.00
Order total
$52.00

A glimpse of what comes next
A bright, entry-level collector pack with five surprise cards.

Iconic duos, one sealed pack
A partner-focused set for collectors who like character cards.

Premium foil-heavy selection
A premium pack with shiny variants and elevated hit rates.
Checkout events
Embedded checkout reports each lifecycle change to the merchant page. Hosted checkout returns through the configured success or cancel URL.
event: "complete"
sessionId: "chk_test_••••4f2a"
order: "Collector starter bundle"
The secure payment UI is ready for the customer.
The selected currency, network, or checkout state changed.
The merchant can confirm the order and begin fulfilment.
The cart stays available and the customer can try again.
Implementation flow
Create the payment securely on your server, open the chosen checkout experience, and keep the merchant page synchronized with every lifecycle event.
View the integration exampleCreate on your server
Your secret API key stays server-side while you create a session for the exact cart and merchant origin.
Choose the customer experience
Redirect to the hosted checkout URL, or use the browser SDK to mount checkout inside the merchant page.
React to lifecycle events
Update your order UI from ready, change, complete, return, cancel, and error events—without a redirect.
Reference integration
This playground uses the same session endpoint for both modes. Inspect the hosted redirect, then compare it with the browser SDK and iframe bridge.
const session = await paybytoken.checkoutSessions.create({
currency: "usd",
line_items: cart,
supported_tokens: [
{ currency: "USDC", chain: "base" },
{ currency: "USDT", chain: "ethereum" },
],
ui_mode: "hosted",
success_url: "https://shop.example.com/order/success",
cancel_url: "https://shop.example.com/cart",
});
// Send the customer to Paybytoken-hosted checkout.
window.location.assign(session.url);Your turn
Set a top-up amount, choose a prepared product, or send a multi-item cart through hosted and embedded checkout.
Choose an order