Guides

Price testing in your framework.

Step-by-step guides with working code for the stack you already run: Next.js, SvelteKit, Django, Laravel, Rails, Go and more.

Guide7 min

How to A/B test prices in Astro

Price testing in Astro: render the pricing page on demand, set the price cookie in page frontmatter, and charge it from an API endpoint with Stripe.

Guide9 min

How to A/B test prices in Django

Price testing in Django with working code: show each visitor a tested price, charge it in Stripe Checkout, verify the revenue and keep cache_page out of it.

Guide7 min

How to A/B test prices in Express

Price testing in Express 5: pass req to getPrice(), append the cookies with res.append, charge the same price with Stripe Checkout, and flush on shutdown.

Guide7 min

How to A/B test prices in FastAPI

Price testing in FastAPI: use the async client in async def routes, keep cookies on TemplateResponse and redirects, and charge the tested price in Stripe.

Guide7 min

How to A/B test prices in Flask

Price testing in Flask, step by step: send the visitor cookie with every response, charge the tested price in Stripe Checkout and verify revenue by webhook.

Guide7 min

How to A/B test prices in Go

Price testing in Go with net/http and stripe-go: write the cookie before the body, bound waits with context, charge the tested price and close on shutdown.

Guide6 min

How to A/B test prices in Hono

Price testing in Hono: pass c.req.raw to getPrice(), append its cookies with c.header, charge with Stripe Checkout, and flush events on any runtime.

Guide7 min

How to A/B test prices in Laravel

Price testing in Laravel: keep the signed visitor cookie out of EncryptCookies, charge the tested price in Stripe Checkout and verify revenue by webhook.

Guide9 min

How to A/B test prices in Next.js (App Router)

Price testing in Next.js 16: assign the price in proxy.ts, render it in a Server Component, charge it with Stripe Checkout and verify the revenue.

Guide7 min

How to A/B test prices in Nuxt

Price testing in Nuxt 4: price visitors in a Nitro server route, pass its cookie through server rendering, and charge the same price with Stripe Checkout.

Guide7 min

How to A/B test prices in Rails

Price testing in Rails 8: write the visitor cookie on Rack 2 or 3, keep Turbo out of the Stripe redirect, charge the tested price and verify the revenue.

Guide8 min

How to A/B test prices in React Router v7 (framework mode)

Price testing in React Router v7 framework mode: price visitors in a loader, send the cookie via the headers export, charge the same price in an action.

Guide7 min

How to A/B test prices in SvelteKit

Price testing in SvelteKit: get the price in +page.server.ts, set its cookie with cookies.set, charge it from a form action, and verify Stripe revenue.

Guide7 min

How to A/B test prices on Cloudflare Workers

Price testing on Cloudflare Workers: build the client per isolate, fill a static pricing page with HTMLRewriter, charge with Stripe, flush via waitUntil.