What problem does it solve?
This Skill provides comprehensive guidance and code examples for implementing complex subscription billing systems for SaaS applications, addressing common challenges like state management, proration, and dunning.
Core Features & Use Cases
- Subscription State Machines: Visual diagrams and SQL schemas for managing subscription lifecycle states (trialing, active, past_due, etc.).
- Proration Logic: Code examples for calculating charges and credits when plans are changed mid-cycle.
- Dunning Sequences: Strategies and code for recovering failed payments and managing grace periods.
- Metered Billing: Implementations for tracking usage and hybrid pricing models.
- Feature Gating: Examples of how to control feature access based on subscription plans.
- Use Case: You are building a new SaaS product and need to implement a reliable subscription billing system that handles upgrades, downgrades, failed payments, and usage-based charges.
Quick Start
Use the saas-billing-patterns skill to generate a subscription state machine diagram and its corresponding SQL schema.