Skip to content

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.

ComponentWhat it does
Swft Checkout pluginSerialises 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 WorkerServes checkout.swft.co.uk/{sessionId} — reads session from KV (fast path) or falls back to API, injects it into the HTML shell
Checkout frontendReact SPA at checkout.swft.co.uk — two-step form, Stripe Elements, order summary, Express checkout (Apple/Google Pay)
Swft CartOptional free WordPress plugin — a slide-in cart drawer with 18 modules
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 shown
RequirementMinimum
WordPress6.0
WooCommerce8.0
PHP8.0
Stripe accountRequired for payments
Swft API keyRequired — get one at swft.co.uk
  • 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