billing-state-machine
CommunityEnforce billing state transitions safely.
Authormarquesfelip
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Billing state machine solves the challenge of defining, enforcing, and synchronizing subscription states across systems, ensuring consistent access control and accurate Stripe status.
Core Features & Use Cases
- Define all valid states and their allowed transitions and provide a single source of truth for state changes.
- Enforce transitions at the database and application layer, preventing invalid state changes and race conditions.
- Synchronize Stripe subscription statuses to local state using a deterministic mapping from Stripe events to transitions.
- Handle concurrent webhook events safely with optimistic locking and idempotent transitions.
- Emit downstream effects (entitlements, emails, audit logs) on each transition to keep downstream systems in sync.
Quick Start
Implement the state machine in your subscription service and wire Stripe webhooks to drive transitions.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: billing-state-machine Download link: https://github.com/marquesfelip/agents-and-skills/archive/main.zip#billing-state-machine Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.