Skip to content

Swft Docs

Edge-rendered checkout. Headless cart. Partner-first API.
A booking checkout in 12 lines
import { Swft } from '@swft-checkout/js'
const swft = new Swft({ apiKey: merchant.api_key })
const session = await swft.sessions.create({
cart: {
items: [{ id: 'class:reformer-100', name: '60-min Reformer', quantity: 1, price: 2500 }],
extensions: {
booking: {
class_schedule_id: 'cs_8f...',
user_id: 'usr_31...',
studio_id: 'stu_4d...',
payment_type: 'single',
},
},
},
})
window.location.href = session.sessionUrl

164 ms TTFB

Checkout loads in under 200 ms globally via Cloudflare’s edge network. Sessions pre-create on cart update — zero API round-trip on redirect.

WordPress optional

Drop the plugin in WooCommerce and Swft handles every checkout. Or skip WordPress entirely — Next.js, Medusa, and vanilla JS adapters ship in the box.

Modules, not monolith

Dunning, KYC, gift cards, fraud rules, bundles, donations, subscriptions. Each module is opt-in and configurable from the dashboard.

Partner-first API

Onboard your own merchants. Stripe Connect, custom domains, pre-confirmation hooks, Standard Webhooks. One bearer token, one OpenAPI spec.

The v2 Partner API lets a SaaS platform onboard its own customers as Swft merchants, drive checkout sessions on their behalf, and receive lifecycle webhooks.

The full docs and partner API spec are available as llms.txt so any LLM-backed IDE can ingest the surface in one fetch.