Subscription Payment Due (v0.0.1)
Emitted when a subscription payment is due for collection
Overview
The SubscriptionPaymentDue event is emitted by the Billing Service when a subscription’s billing cycle is due for payment. This event triggers the payment collection process in the Payment domain.
Cross-Domain Communication
This event facilitates communication between:
- Source: Subscriptions Domain (BillingService)
- Target: Payment Domain (PaymentService, FraudDetectionService)
Schema
Event Flow
- BillingService calculates when payment is due
- Emits
SubscriptionPaymentDueevent - PaymentService receives and initiates payment
- FraudDetectionService performs risk assessment
- Payment is processed through PaymentGatewayService
Example Payload
{ "subscriptionId": "sub_ABC123", "customerId": "cust_XYZ789", "invoiceId": "inv_123456", "amount": 49.99, "currency": "USD", "dueDate": "2024-02-01T00:00:00Z", "billingPeriod": { "start": "2024-02-01", "end": "2024-02-29" }, "planId": "pro-monthly", "retryAttempt": 0} Event-driven architecture documentation: FlowMart