Overview
Swft is two things: a WordPress plugin and a hosted checkout.
The plugin intercepts the WooCommerce checkout page and redirects customers to checkout.swft.co.uk. Sessions are pre-created on cart update so the redirect lands on an already-loaded page. The checkout itself is a React application served from Cloudflare Pages, rendered by a Cloudflare Worker that injects the session as window.__SWFT_SESSION__.
Your store stays on WordPress. Only checkout moves to the edge.
Components
Section titled “Components”| Component | What it does |
|---|---|
| Swft Checkout plugin | Serialises the WooCommerce cart, calls the Swft API to create a session, and redirects to checkout.swft.co.uk/{sessionId} |
Swft API (api.swft.co.uk) | Validates the cart payload, creates the session in Supabase and Cloudflare KV, creates the Stripe PaymentIntent on /pay, and handles webhooks |
| Cloudflare Worker | Serves checkout.swft.co.uk/{sessionId} — reads session from KV (fast path) or falls back to API, injects it into the HTML shell |
| Checkout frontend | React SPA at checkout.swft.co.uk — two-step form, Stripe Elements, order summary, Express checkout (Apple/Google Pay) |
| Swft Cart | Optional free WordPress plugin — a slide-in cart drawer with 18 modules |
Data flow
Section titled “Data flow”Customer clicks "Checkout" → WooCommerce checkout page → Swft plugin: check transient cache for pre-created session → HIT: instant redirect to checkout.swft.co.uk/{sessionId} → MISS: POST to api.swft.co.uk/sessions → get sessionUrl → redirect
checkout.swft.co.uk/{sessionId} → Cloudflare Worker: read session from KV → KV HIT: inject window.__SWFT_SESSION__ into HTML → KV MISS: GET api.swft.co.uk/sessions/{id} → inject → React app boots, reads window.__SWFT_SESSION__
Customer completes details step → POST api.swft.co.uk/sessions/{id}/pay → Stripe PaymentIntent created → Stripe Elements shown
Customer pays → Stripe webhook: payment_intent.succeeded → api.swft.co.uk/webhooks/stripe → WooCommerce order created via REST API (status: processing) → Confirmation screen shownRequirements
Section titled “Requirements”| Requirement | Minimum |
|---|---|
| WordPress | 6.0 |
| WooCommerce | 8.0 |
| PHP | 8.0 |
| Stripe account | Required for payments |
| Swft API key | Required — get one at swft.co.uk |
What Swft does not change
Section titled “What Swft does not change”- Product pages, cart page, account pages — untouched
- WooCommerce order management — all orders land in WP Admin as normal
- Existing payment gateways — Swft replaces checkout only; other gateways remain for orders placed outside Swft
- Coupons and discounts — calculated by WooCommerce, passed through in the session payload