PaybytokenDocs
Checkout
Guide · Checkout

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:

ModeCustomer experienceBest for
HostedRedirect the customer to a Paybytoken-hosted payment page.The quickest integration and the least frontend code.
EmbeddedMount checkout inside your website with @paybytoken/checkout or @paybytoken/react.A payment flow that stays inside your product.
CustomRender 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:

One secure payment loop
TrustedMerchant serverPrice + secret key
PaybytokenCheckout SessionHosted, embedded or custom
CustomerBrowser + walletSelects and sends
FulfillmentSigned webhookVerify on your server
Only session-scoped browser values cross into the customer page. Secret keys and fulfillment stay on your server.
  1. Your server authenticates the customer, resolves the order and creates a Checkout Session using @paybytoken/node or the API.
  2. For hosted checkout, your browser redirects to session.url.
  3. For embedded checkout, your server returns only client_secret and url to the matching page. The browser SDK uses those session-scoped values to mount checkout.
  4. 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.
  5. Paybytoken watches the selected chain and sends signed webhook events.
  6. 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/checkout

React applications can also install the wrapper:

npm install @paybytoken/react
PackageRuntimePurpose
@paybytoken/nodeServerCreate and retrieve Paybytoken resources with a secret API key.
@paybytoken/checkoutBrowserMount framework-independent embedded checkout.
@paybytoken/reactBrowserReact component and lifecycle bindings.

Choose your next step

On this page

API Workbench

Full Explorer

Open in new tab