Checkout overview
Choose hosted, embedded or custom Paybytoken stablecoin checkout.
Paybytoken Checkout presents a merchant-defined order and lets the customer pay with an enabled stablecoin and chain. The same Checkout Session powers three customer experiences:
| Mode | Customer experience | Best for |
|---|---|---|
| Hosted | Redirect the customer to a Paybytoken-hosted payment page. | The quickest integration and the least frontend code. |
| Embedded | Mount checkout inside your website with @paybytoken/checkout or @paybytoken/react. | A payment flow that stays inside your product. |
| Custom | Render your own selection and transfer UI, then confirm through your server. | Complete visual and interaction ownership. |
All modes support the same server-owned prices, line items, token choices, payment lifecycle and webhook-based fulfillment. Hosted and embedded include Paybytoken's wallet and manual-transfer UI; custom checkout lets your application render those customer states.
Integration boundary
Checkout has a strict server/browser boundary:
- Your server authenticates the customer, resolves the order and creates a Checkout Session
using
@paybytoken/nodeor the API. - For hosted checkout, your browser redirects to
session.url. - For embedded checkout, your server returns only
client_secretandurlto the matching page. The browser SDK uses those session-scoped values to mount checkout. - For custom checkout, your server keeps the CSRF token, exposes browser-safe token options and confirms the selected token on behalf of the authenticated customer.
- Paybytoken watches the selected chain and sends signed webhook events.
- Your server fulfills the order only after a verified terminal event or authenticated API lookup.
Never expose a merchant sk_test_... or sk_live_... key to the browser. Never trust a price,
destination address or fulfillment decision supplied by browser code.
Packages
npm install @paybytoken/node @paybytoken/checkoutReact applications can also install the wrapper:
npm install @paybytoken/react| Package | Runtime | Purpose |
|---|---|---|
@paybytoken/node | Server | Create and retrieve Paybytoken resources with a secret API key. |
@paybytoken/checkout | Browser | Mount framework-independent embedded checkout. |
@paybytoken/react | Browser | React component and lifecycle bindings. |
Choose your next step
- Start with Model orders and payment attempts to define your server-side resource lifecycle.
- Review Supported stablecoins and networks before building a token allowlist.
- Follow Hosted checkout for the shortest redirect integration.
- Start with Embedded checkout quickstart to keep payment inside your page.
- Use Custom checkout when your product owns every payment component.
- Use the Checkout Sessions API for a raw server integration.
- Read Fulfill orders with webhooks before accepting real orders.
- Finish with the go-live checklist.
Did this page answer your question?
Your feedback helps us improve the integration path.