Subscription Patterns
Recurring billing management with Stripe Subscriptions including plan configuration, upgrades, cancellation, and usage limits.
What's Included#
- Subscription plan definitions with per-plan feature limits
- Subscription creation via Stripe Checkout sessions
- Webhook handler for subscription lifecycle events (created, updated, deleted)
- Plan detection and usage limit enforcement based on active subscription
- Cancellation (immediate or at period end) and reactivation flows
- Plan change with Stripe proration for fair billing
- Subscription status display component
Usage#
Via CLI#
Loading code block...
Via AI Assistant#
Ask your AI assistant:
- "Use the subscriptions pattern from Bootspring"
- "Apply the Bootspring subscriptions pattern to my project"
Key Considerations#
- Always use webhooks for subscription state changes, never rely on redirect success URLs
- Handle failed payments gracefully with dunning emails and paused access
- Use Stripe proration when changing plans for fair mid-cycle billing
- Provide grace periods before revoking access so users can update payment methods
- Display clear plan limits and upgrade paths so users understand their options
Related Patterns#
- Stripe - Stripe setup
- Webhooks - Webhook handling
- Usage Billing - Metered billing