For the complete documentation index, see llms.txt. Prefer markdown by appending.mdto documentation URLs or sendingAccept: text/markdown.
Configuration
A shared billing catalog for your Edge app's plans, recurring prices, trials, discounts, and translated pricing copy.
Your billing catalog defines the offer customers see across pricing, checkout, and billing settings. Edit src/config/billing.ts to adapt the starting Free, Premium, and Enterprise plans to your product.
Plans
Each plan has a name, description, features, optional limits, and its available prices. Names and feature descriptions use translated message keys, so your pricing copy stays consistent across languages.
Keep plans ordered from the lowest tier to the highest. Paid access checks use that order when comparing a customer's plan with a feature's minimum tier.
Product limits
Plan limits describe what you sell. Enforce project counts, storage allowances, or usage budgets in the server operation that consumes them. The plan access recipe covers paid authorization.
Prices
A variant represents a price for a plan, such as a monthly or yearly subscription.
| Setting | Purpose |
|---|---|
| Price ID | The recurring price in your Stripe account |
| Amount | The displayed amount in the smallest currency unit |
| Interval | Monthly or yearly billing |
| Trial | Optional free trial length |
For example, the recurring portion of a monthly variant can look like this:
{
id: "<your-stripe-price-id>",
cost: 1_900,
type: BillingType.FLAT,
model: BillingModel.RECURRING,
interval: RecurringInterval.MONTH,
trialDays: 7,
}The amount above displays $19.00. Stripe determines the actual charge, so keep the configured amount and interval aligned with your Stripe price.
Your Stripe account
Create your own products and recurring prices, then replace the starting price IDs. Test and live mode use separate prices and credentials.
Free access does not start a paid checkout. The Enterprise option directs customers to contact sales; you can change that destination and label to match your offer.
Discounts
Configure the promotion code, its amount or percentage, and the prices it applies to. Create a matching active promotion code in Stripe with the same offer.
{
code: "50OFF",
type: BillingDiscountType.PERCENT,
value: 50,
appliesTo: [
"price_1UHjevJtCskhKUquP9uiJeLQ",
"price_1UHjf6JtCskhKUquSQRrNmMB"
]
}The pricing page can display the discount, while checkout applies it only to eligible prices. Check the final total in Stripe test checkout, including any expiration and redemption restrictions.
The subscriptions guide covers Stripe prices, webhooks, the customer portal, and testing. Keep credentials in environment configuration, separate from the public catalog.
How is this guide?
Last updated on
Overview
A subscription billing foundation with Stripe checkout, a shared plan catalog, trials, discounts, customer management, and paid feature access.
Subscriptions
Stripe subscription setup for Edge Kit, including recurring prices, webhook delivery, customer portal settings, discounts, and cancellation.