Overview
The Subscriptions Domain is responsible for managing all aspects of subscription-based services within our e-commerce platform. This includes subscription lifecycle management, recurring billing, plan management, and integration with payment systems.
Core Capabilities
- Subscription Lifecycle: Create, update, pause, resume, and cancel subscriptions
- Billing Cycles: Manage monthly, quarterly, and annual billing cycles
- Plan Management: Define and manage subscription plans and pricing
- Trial Periods: Support free trials and promotional periods
- Usage-based Billing: Track and bill based on usage metrics
Services
BillingService
Handles billing cycle calculations, invoice generation, and payment scheduling. Coordinates with the Payment domain for processing recurring payments.
PlanManagementService
Manages subscription plans, features, and pricing tiers. Controls feature access and usage limits based on subscription level.
Cross-Domain Integration
The Subscriptions domain integrates closely with:
- Payment Domain: For processing recurring payments and handling payment failures
- Orders Domain: For managing subscription-based product orders
- Customer Domain: For customer account and profile management
Domain Events
Key events in the Subscriptions domain:
SubscriptionPaymentDue
- Triggers payment collectionInvoiceGenerated
- New invoice createdBillingCycleCompleted
- Billing cycle successfully completedPlanMigrationCompleted
- Subscription plan changed