Swft Checkout
Swft Checkout is the hosted edge-rendered checkout that replaces WooCommerce’s native checkout page.
How it works
Section titled “How it works”The WordPress plugin intercepts the WooCommerce checkout URL via template_redirect (priority 1). When the cart is non-empty and Swft is enabled with a valid API key, the plugin looks up a pre-created session URL from a WordPress transient and redirects with wp_safe_redirect().
The checkout runs at checkout.swft.co.uk/{sessionId}. It is a React application rendered by a Cloudflare Worker. The Worker reads the session from Cloudflare KV and injects it as window.__SWFT_SESSION__ into the HTML before it reaches the browser — the app boots with full data, no loading state.
Checkout flow
Section titled “Checkout flow”Step 1 — Details
Section titled “Step 1 — Details”- Express checkout (Apple Pay, Google Pay) rendered first
- Email address
- Shipping address (auto-filled for returning customers)
- Shipping method (radio cards from WooCommerce rates)
Step 2 — Payment
Section titled “Step 2 — Payment”- Review strip summarising step 1 data with inline Edit links
- Stripe Elements card input
- Pay button showing exact total:
Pay £[amount]
Confirmation
Section titled “Confirmation”- Order reference
- Delivery address
- Estimated delivery window
- Interactive map (requires Google Maps API key)
Templates
Section titled “Templates”Three checkout layout templates are available. Select in Settings → Swft Checkout → Checkout Layout. See Templates for details.
Order sync
Section titled “Order sync”After payment, the Swft API creates a native WooCommerce order via the WooCommerce REST API with:
status: processingpayment_method: swftpayment_method_title: Card (Swft)- All line items and shipping line
- Billing and shipping address
_swft_session_idand_swft_payment_intentorder meta- All extension data as
_swft_ext_{key}meta fields
This requires WooCommerce REST API credentials to be configured. See Installation.
Session lifecycle
Section titled “Session lifecycle”| Status | Meaning |
|---|---|
pending | Session created, customer has not reached checkout yet |
processing | Customer is on the checkout page |
complete | Payment succeeded, order created |
expired | Session TTL exceeded (28 minutes from creation) |
Sessions expire 28 minutes from creation. The transient caching on the WordPress side matches this TTL. If a session expires while the customer is mid-checkout, they see “This checkout link has expired — please return to the store and try again.”