What problem does it solve? Building a monetizable SaaS backend requires coordinating plan configuration, license key management, subscription state machines, checkout validation, and trial lifecycle logic, and wiring these incorrectly leads to duplicate charges, leaked premium features, and provider lock-in. ## Core Features & Use Cases - Plan Configuration and Feature Gating: Define tiers as static TypeScript config with feature flags and usage limits, enforced server-side via NestJS guards like @RequireFeature. - License Lifecycle Management: Generate 256-bit license keys, manage status transitions (active, expired, revoked, paused), and expose a rate-limited public verification endpoint with caching. - Subscription State Machine: Handle payment provider webhooks (created, activated, canceled, past_due, paused, resumed) with provider-agnostic handlers that provision licenses and emit internal events. - Checkout and Trial Flows: Pre-checkout validation, customer portal sessions, price ID mapping, trial reminders, and auto-downgrade on trial expiry. - Use Case: A NestJS team adding a freemium model to their API uses this Skill to scaffold plans.config.ts, a LicenseService, webhook-driven SubscriptionService, and a checkout controller without coupling business logic to Stripe or Paddle. ## Quick Start Ask the AI to implement a freemium monetization layer for a NestJS backend with community, pro, and enterprise tiers including license verification and subscription webhook handling.