Skip to content

Plan

Source: src/Stripe/Plan.ts

A Stripe Plan — the legacy (pre-Price) catalog object that defines currency, amount, and billing interval for a Product. Prefer Price for new catalogs; Plan exists for the Plans API.

Currency, amount, interval, usage type, and billing scheme are immutable (changing them replaces the plan). Nickname, metadata, active, trialPeriodDays, and product update in place. Destroy hard-deletes the plan; existing subscribers are not affected.

Monthly plan

const product = yield* Stripe.Product("pro-plan", { name: "Pro Plan" });
const plan = yield* Stripe.Plan("pro-monthly", {
product: product.id,
currency: "usd",
interval: "month",
amount: 1500,
nickname: "Pro monthly",
});

Yearly plan

const plan = yield* Stripe.Plan("pro-yearly", {
product: product.id,
currency: "usd",
interval: "year",
amount: 15000,
nickname: "Pro yearly",
});
const plan = yield* Stripe.Plan("pro-monthly", {
product: product.id,
currency: "usd",
interval: "month",
amount: 1500,
nickname: "Pro monthly (paused)",
trialPeriodDays: 14,
metadata: { tier: "pro" },
});