Skip to content

Repository files navigation

Subscription Patterns

Universal subscription billing patterns for SaaS products. How proration works, how to implement free trials, when to apply plan changes, how to handle failed payments, and more.

Framework-agnostic patterns with @commet/node code examples.

Install

npx skills add commet-labs/subscription-patterns

What's Inside

Pattern Description
Trials & Intro Offers Free trials, discounted first cycles, conversion to paid
Upgrades & Downgrades Plan changes, when to apply immediately vs at renewal
Proration Logic Mid-cycle credits and charges, time-based calculation
Dunning & Retries Failed payment handling, retry schedules, grace periods
Cancellation Flows Immediate vs end-of-period, reactivation, save offers
Add-ons & Extras Feature extensions, mid-cycle activation, consumption matching

Key Principle

Subscription behavior must be explicit per operation. In Commet, plan changes use billing-interval direction, plan-group sortOrder, and paid/free transitions; price alone never classifies an upgrade or downgrade.

Links

License

MIT

About

Agent Skills for billing

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors