Skip to content

v0.4.0

Choose a tag to compare

@iamceeso iamceeso released this 11 Apr 17:48
· 81 commits to main since this release
5797a57

What’s New

Subscriptions

  • Full lifecycle management: create, swap, cancel, resume
  • Grace period cancellations with resume support
  • Prorated plan switching via SubscriptionService
  • Monthly and annual billing cycle support

Stripe Integration

  • Webhook handling for 6 event types (idempotent & retry-safe)
  • Signature verification with proper CSRF exemption
  • Invoice sync from Stripe
  • Lazy-loaded Stripe client for reduced API calls

Plan Management

  • Multiple pricing tiers (monthly / annual)
  • Configurable trial periods
  • Feature definitions via PlanFeature
  • Plan activation and deactivation

Frontend

  • Pricing page with monthly/annual toggle
  • Checkout flow
  • Subscription dashboard and detail view
  • Invoice history

Security & Data Integrity

  • Policy-based authorization (user isolation)
  • Atomic database transactions
  • Race condition prevention
  • Full PHP 8.3 type safety
  • Audit trail via BillingEvent
  • Webhook logging with retry support

Database

  • 6 new tables:

    • subscription_plans
    • plan_prices
    • plan_features
    • customer_subscriptions
    • billing_events
    • webhook_logs
  • 2 versioned migrations with constraints and integrity enforcement

Testing

  • 100 passing tests
  • Covers unit, feature, authorization, webhook, and transaction flows

Full Changelog

v0.3.1...v0.4.0