Subscriptions (v0.0.1)

Manages subscription lifecycle, billing cycles, and plan management for recurring revenue streams.

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 collection
  • InvoiceGenerated - New invoice created
  • BillingCycleCompleted - Billing cycle successfully completed
  • PlanMigrationCompleted - Subscription plan changed

Bounded context

Messages for this domain

Sends messages (2)

Quickly find the message you need by searching for the name, type, or summary.
NameVersionTypeSummary
Subscription Payment Due
v0.0.1eventEmitted when a subscription payment is due for collection
Process Payment
v0.0.1commandCommand to process a payment through the payment gateway

Receives messages (2)

Quickly find the message you need by searching for the name, type, or summary.
NameVersionTypeSummary
Payment Processed
v0.0.1eventEvent is triggered after the payment has been successfully processed
Payment Failed
v0.0.1eventEmitted when a payment attempt fails