Subscription plans (Free, Pro, Enterprise, ...)
Define subscription plans (plan_id, name, price, interval) in Payments. Use the AI tool definePlans, or edit the plan catalog directly. Required before generating any code that references plan_ids, call getPlans first so plan_ids stay consistent.
Where to enable it
Toggle this feature in your project editor. No code required.
Inside the editor, head to Payments.
Open in my projectRecipes that use this
Real-world patterns that combine this primitive with others.
Related features
Feature catalog & entitlements
Define feature_keys (e.g. unlimited_uploads, advanced_analytics) and assign them to plans with per-plan limits. Code calls payments.hasFeature(key) to gate UI/logic. Always call getFeatures before generating gating code so feature_keys stay consistent.
Subscription management & comping
View, filter, and cancel subscriptions in Payments. To grant a free/comp subscription without going through the payment gateway, use the grantSubscription tool, useful for trials, partner deals, or support overrides.
Entitlement model (plans + features)
Entitlement is plan-driven: a subscription grants a set of features. Auth handles WHO the user is; Payments handles WHAT they can access. Do not gate features via auth roles, gate via payments.hasFeature.