For the complete documentation index, see llms.txt. Prefer markdown by appending.mdto documentation URLs or sendingAccept: text/markdown.
Overview
A subscription billing foundation with Stripe checkout, a shared plan catalog, trials, discounts, customer management, and paid feature access.
Edge Kit connects the pieces needed to sell a subscription product: your plan catalog, pricing interface, checkout, customer billing settings, subscription records, and paid access checks.
Stripe handles payments and its hosted checkout and customer portal. Better Auth's Stripe integration connects billing to customer accounts and D1, so your application can use the customer's subscription when deciding which features they can access.
Why Stripe?
Stripe is a popular payment processor that is easy to use and integrate with your app. It is also a good choice for small businesses and startups.
Recently, they introduced Stripe Managed Payments, which also simplify tax burden and compliance for EU customers.
Billing system
The integration includes:
- A shared catalog for plan names, translated features, prices, and product limits.
- A pricing interface with billing interval selection, trial information, and promotion codes.
- Recurring subscriptions with monthly and yearly prices and optional trials.
- Hosted checkout connected to the signed-in customer's account.
- Customer billing settings and access to Stripe's customer portal.
- Webhook synchronization so subscription changes reach your application.
- Server-side plan checks for restricting features to a minimum tier.
Use these pieces to define your own subscription offer and connect it to the features customers pay for. Subscriptions belong to individual customer accounts.
Plans
Define your tiers, prices, features, trials, and discounts in the shared catalog. The same configuration supplies pricing and checkout, keeping the offer consistent across your app.
The starting Free, Premium, and contact-sales Enterprise plans demonstrate this configuration. Replace their names and offer with your product's plans; monthly and yearly prices are examples of variants within a tier.
Payments
Customers choose a plan through your pricing interface and complete payment in Stripe's hosted checkout. Stripe then notifies the app through a webhook, updating the subscription record used by billing settings and access checks.
Subscription status
The webhook keeps your application's subscription records up to date. A checkout success page alone does not confirm paid access.
Customers can open the Stripe Customer Portal to manage payment methods and the subscription actions you enable, including cancellation. Promotion codes connect your displayed offers to Stripe discounts.
Access
Active subscriptions and trials grant access to the corresponding plan. Use the included server-side checks to restrict a resource or operation to a minimum tier, with upgrade prompts in the UI.
Your catalog also describes resource limits. For project counts, storage allowances, or AI usage, enforce the allowance where the operation creates or consumes that resource. The plan access recipe shows how to connect subscription policy to a feature.
Configuration
A shared billing catalog for your Edge app's plans, recurring prices, trials, discounts, and translated pricing copy.
Subscriptions
Stripe subscription setup for Edge Kit, including recurring prices, webhook delivery, customer portal settings, discounts, and cancellation.
Webhooks
Stripe webhook synchronization in Edge Kit, with subscription state, signed events, local testing, delivery diagnostics, and custom billing workflows.
How is this guide?
Last updated on



