Paybytoken
Paybytoken developer docs

Stablecoin checkout,
built into your product.

Create the order once. Present it through hosted, embedded, or custom checkout. Fulfill only after a verified event.

Hosted + embedded + customUSDC + USDTServer-verified events
checkout.tsServer
import Paybytoken from '@paybytoken/node'

const paybytoken = new Paybytoken(process.env.PAYBYTOKEN_SECRET_KEY!)

const session = await paybytoken.checkoutSessions.create({
  currency: 'usd',
  line_items: order.items,
  ui_mode: 'embedded',
  allowed_origin: 'https://shop.example.com',
})
● Browser-scoped session created201
One session, three surfaces

Choose who owns the checkout UI.

Move between Paybytoken-hosted, embedded, and fully custom experiences without changing your order model or payment lifecycle.

One payment lifecycle

Change the surface, not the architecture.

Every checkout starts server-side and finishes with the same verifiable event, whichever customer experience you choose.

  1. 01
    Your server

    Create

    Resolve the order and create one short-lived session.

  2. 02
    Your checkout

    Present

    Open hosted, mount embedded, or render your custom UI.

  3. 03
    Payment rail

    Monitor

    Paybytoken watches the network and updates payment state.

  4. 04
    Your webhook

    Fulfill

    Verify the signed event and fulfill the order exactly once.

Keep the payment boundary clear.

Your secret key and authoritative order stay on the server. The browser receives only a short-lived credential scoped to one Checkout Session and one exact merchant origin.

Read the security model →
  1. 1Your serverResolves the order and creates the session.Secret key
  2. 2Customer browserMounts checkout with a scoped client secret.One session
  3. 3Your webhookVerifies the event before fulfilling once.Signed event
Scoped SDKs

Install only what you need.

Each package has one runtime boundary, so server credentials never leak into browser bundles.

See the complete flow

Try a real test checkout.

Compare hosted, embedded and custom checkout with single-item, multi-item and custom-amount orders.

Open Playground ↗