@eventcatalog/create-eventcatalog 3.0.9 → 3.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
  3. package/templates/amazon-api-gateway/eventcatalog.config.js +3 -0
  4. package/templates/asyncapi/eventcatalog.config.js +3 -0
  5. package/templates/confluent/eventcatalog.config.js +3 -0
  6. package/templates/default/domains/Orders/entities/CartItem/index.mdx +121 -0
  7. package/templates/default/domains/Orders/entities/Customer/index.mdx +57 -0
  8. package/templates/default/domains/Orders/entities/Order/index.mdx +96 -0
  9. package/templates/default/domains/Orders/entities/OrderItem/index.mdx +59 -0
  10. package/templates/default/domains/Orders/entities/ShoppingCart/index.mdx +148 -0
  11. package/templates/default/domains/Orders/index.mdx +13 -0
  12. package/templates/default/domains/Payment/entities/Address/index.mdx +162 -0
  13. package/templates/default/domains/Payment/entities/Invoice/index.mdx +89 -0
  14. package/templates/default/domains/Payment/entities/Payment/index.mdx +137 -0
  15. package/templates/default/domains/Payment/entities/PaymentMethod/index.mdx +77 -0
  16. package/templates/default/domains/Payment/entities/Transaction/index.mdx +77 -0
  17. package/templates/default/domains/Payment/index.mdx +17 -1
  18. package/templates/default/domains/Payment/services/FraudDetectionService/events/FraudCheckCompleted/index.mdx +48 -0
  19. package/templates/default/domains/Payment/services/FraudDetectionService/events/FraudCheckCompleted/schema.json +44 -0
  20. package/templates/default/domains/Payment/services/FraudDetectionService/index.mdx +59 -0
  21. package/templates/default/domains/Payment/services/PaymentGatewayService/commands/ProcessPayment/index.mdx +72 -0
  22. package/templates/default/domains/Payment/services/PaymentGatewayService/commands/ProcessPayment/schema.json +58 -0
  23. package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/index.mdx +60 -0
  24. package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/schema.json +68 -0
  25. package/templates/default/domains/Payment/services/PaymentGatewayService/index.mdx +78 -0
  26. package/templates/default/domains/ProductCatalog/entities/Category/index.mdx +124 -0
  27. package/templates/default/domains/ProductCatalog/entities/Inventory/index.mdx +116 -0
  28. package/templates/default/domains/ProductCatalog/entities/Product/index.mdx +115 -0
  29. package/templates/default/domains/ProductCatalog/entities/Review/index.mdx +154 -0
  30. package/templates/default/domains/ProductCatalog/index.mdx +74 -0
  31. package/templates/default/domains/Subscriptions/entities/BillingProfile/index.mdx +68 -0
  32. package/templates/default/domains/Subscriptions/entities/SubscriptionPeriod/index.mdx +73 -0
  33. package/templates/default/domains/Subscriptions/index.mdx +13 -2
  34. package/templates/default/domains/Subscriptions/services/BillingService/events/SubscriptionPaymentDue/index.mdx +60 -0
  35. package/templates/default/domains/Subscriptions/services/BillingService/events/SubscriptionPaymentDue/schema.json +54 -0
  36. package/templates/default/domains/Subscriptions/services/BillingService/index.mdx +86 -0
  37. package/templates/default/domains/Subscriptions/services/PlanManagementService/index.mdx +93 -0
  38. package/templates/default/eventcatalog.config.js +3 -0
  39. package/templates/empty/eventcatalog.config.js +3 -0
  40. package/templates/eventbridge/eventcatalog.config.js +3 -0
  41. package/templates/openapi/eventcatalog.config.js +3 -0
@@ -0,0 +1,115 @@
1
+ ---
2
+ id: Product
3
+ name: Product
4
+ version: 1.0.0
5
+ identifier: productId
6
+ aggregateRoot: true
7
+ summary: Represents a product or service available for purchase in the e-commerce system.
8
+ properties:
9
+ - name: productId
10
+ type: UUID
11
+ required: true
12
+ description: Unique identifier for the product
13
+ - name: name
14
+ type: string
15
+ required: true
16
+ description: Name of the product
17
+ - name: description
18
+ type: string
19
+ required: false
20
+ description: Detailed description of the product
21
+ - name: sku
22
+ type: string
23
+ required: true
24
+ description: Stock Keeping Unit - unique product identifier
25
+ - name: price
26
+ type: decimal
27
+ required: true
28
+ description: Current selling price of the product
29
+ - name: categoryId
30
+ type: UUID
31
+ required: true
32
+ description: Category this product belongs to
33
+ references: Category
34
+ referencesIdentifier: categoryId
35
+ relationType: hasOne
36
+ - name: brand
37
+ type: string
38
+ required: false
39
+ description: Brand name of the product
40
+ - name: weight
41
+ type: decimal
42
+ required: false
43
+ description: Weight of the product in kilograms
44
+ - name: dimensions
45
+ type: object
46
+ required: false
47
+ description: Product dimensions (length, width, height)
48
+ properties:
49
+ - name: length
50
+ type: decimal
51
+ - name: width
52
+ type: decimal
53
+ - name: height
54
+ type: decimal
55
+ - name: isActive
56
+ type: boolean
57
+ required: true
58
+ description: Whether the product is currently available for sale
59
+ - name: createdAt
60
+ type: DateTime
61
+ required: true
62
+ description: Date and time when the product was created
63
+ - name: updatedAt
64
+ type: DateTime
65
+ required: false
66
+ description: Date and time when the product was last updated
67
+ - name: images
68
+ type: array
69
+ items:
70
+ type: string
71
+ required: false
72
+ description: URLs of product images
73
+ - name: inventory
74
+ type: Inventory
75
+ required: false
76
+ description: Inventory information for this product
77
+ references: Inventory
78
+ referencesIdentifier: productId
79
+ relationType: hasOne
80
+ - name: reviews
81
+ type: array
82
+ items:
83
+ type: Review
84
+ required: false
85
+ description: Customer reviews for this product
86
+ references: Review
87
+ referencesIdentifier: productId
88
+ relationType: hasMany
89
+ ---
90
+
91
+ ## Overview
92
+
93
+ The Product entity represents items or services available for purchase in the e-commerce system. It serves as an aggregate root containing all product-related information including pricing, categorization, inventory details, and customer reviews.
94
+
95
+ ### Entity Properties
96
+ <EntityPropertiesTable />
97
+
98
+ ## Relationships
99
+
100
+ * **Category:** Each product belongs to one `Category` (identified by `categoryId`).
101
+ * **Inventory:** Each product has one `Inventory` record tracking stock levels.
102
+ * **Review:** A product can have multiple `Review` entities from customers.
103
+ * **OrderItem:** Products are referenced in `OrderItem` entities when included in orders.
104
+
105
+ ## Examples
106
+
107
+ * **Product #1:** "iPhone 15 Pro" - Electronics category, $999.99, with 50 units in stock and 4.5-star reviews.
108
+ * **Product #2:** "Running Shoes" - Sports category, $129.99, various sizes available, with detailed size chart.
109
+
110
+ ## Business Rules
111
+
112
+ * Products must have a unique SKU across the entire catalog
113
+ * Products cannot be deleted if they have associated order items
114
+ * Price changes should be tracked for audit purposes
115
+ * Products must belong to an active category to be purchasable
@@ -0,0 +1,154 @@
1
+ ---
2
+ id: Review
3
+ name: Review
4
+ version: 1.0.0
5
+ identifier: reviewId
6
+ summary: Represents customer reviews and ratings for products.
7
+ properties:
8
+ - name: reviewId
9
+ type: UUID
10
+ required: true
11
+ description: Unique identifier for the review
12
+ - name: productId
13
+ type: UUID
14
+ required: true
15
+ description: Product being reviewed
16
+ references: Product
17
+ referencesIdentifier: productId
18
+ relationType: hasOne
19
+ - name: customerId
20
+ type: UUID
21
+ required: true
22
+ description: Customer who wrote the review
23
+ references: Customer
24
+ referencesIdentifier: customerId
25
+ relationType: hasOne
26
+ - name: orderId
27
+ type: UUID
28
+ required: false
29
+ description: Order associated with this review (for verified purchases)
30
+ references: Order
31
+ referencesIdentifier: orderId
32
+ relationType: hasOne
33
+ - name: rating
34
+ type: integer
35
+ required: true
36
+ description: Rating given by customer (1-5 stars)
37
+ minimum: 1
38
+ maximum: 5
39
+ - name: title
40
+ type: string
41
+ required: false
42
+ description: Review title or headline
43
+ - name: content
44
+ type: string
45
+ required: true
46
+ description: Review content and comments
47
+ - name: isVerifiedPurchase
48
+ type: boolean
49
+ required: true
50
+ description: Whether this review is from a verified purchase
51
+ - name: isRecommended
52
+ type: boolean
53
+ required: false
54
+ description: Whether customer recommends this product
55
+ - name: helpfulVotes
56
+ type: integer
57
+ required: true
58
+ description: Number of helpful votes received
59
+ - name: totalVotes
60
+ type: integer
61
+ required: true
62
+ description: Total number of votes received
63
+ - name: status
64
+ type: string
65
+ required: true
66
+ description: Current review status
67
+ enum: ['pending', 'approved', 'rejected', 'flagged']
68
+ - name: moderationNotes
69
+ type: string
70
+ required: false
71
+ description: Internal moderation notes
72
+ - name: images
73
+ type: array
74
+ items:
75
+ type: string
76
+ required: false
77
+ description: URLs of images uploaded with the review
78
+ - name: pros
79
+ type: array
80
+ items:
81
+ type: string
82
+ required: false
83
+ description: List of positive aspects mentioned
84
+ - name: cons
85
+ type: array
86
+ items:
87
+ type: string
88
+ required: false
89
+ description: List of negative aspects mentioned
90
+ - name: merchantResponse
91
+ type: object
92
+ required: false
93
+ description: Response from merchant to this review
94
+ properties:
95
+ - name: content
96
+ type: string
97
+ description: Merchant response content
98
+ - name: respondedAt
99
+ type: DateTime
100
+ description: When merchant responded
101
+ - name: respondedBy
102
+ type: string
103
+ description: Who responded for the merchant
104
+ - name: createdAt
105
+ type: DateTime
106
+ required: true
107
+ description: Date and time when the review was created
108
+ - name: updatedAt
109
+ type: DateTime
110
+ required: false
111
+ description: Date and time when the review was last updated
112
+ - name: moderatedAt
113
+ type: DateTime
114
+ required: false
115
+ description: Date and time when the review was moderated
116
+ ---
117
+
118
+ ## Overview
119
+
120
+ The Review entity captures customer feedback and ratings for products. It supports verified purchase validation, content moderation, community voting, and merchant responses to build trust and provide valuable product insights.
121
+
122
+ ### Entity Properties
123
+ <EntityPropertiesTable />
124
+
125
+ ## Relationships
126
+
127
+ * **Product:** Each review belongs to one `Product` (identified by `productId`).
128
+ * **Customer:** Each review is written by one `Customer` (identified by `customerId`).
129
+ * **Order:** Each review can be linked to one `Order` for purchase verification (identified by `orderId`).
130
+
131
+ ## Review Lifecycle
132
+
133
+ ```
134
+ submitted → pending → approved → published
135
+ ↓ ↓
136
+ rejected flagged
137
+ ```
138
+
139
+ ## Examples
140
+
141
+ * **Review #1:** 5-star review for iPhone 15 Pro, verified purchase, "Excellent camera quality!"
142
+ * **Review #2:** 3-star review for Running Shoes, helpful votes: 15/20, includes photos
143
+ * **Review #3:** 1-star review flagged for inappropriate content, pending moderation
144
+
145
+ ## Business Rules
146
+
147
+ * Reviews can only be submitted by customers who purchased the product
148
+ * Rating must be between 1-5 stars
149
+ * Verified purchase reviews are given higher weight in calculations
150
+ * Inappropriate content is flagged and requires moderation
151
+ * Customers can only review the same product once per purchase
152
+ * Helpful votes help surface most valuable reviews
153
+ * Merchant responses are limited to one per review
154
+ * Reviews older than 2 years may have reduced weight in calculations
@@ -0,0 +1,74 @@
1
+ ---
2
+ id: ProductCatalog
3
+ name: Product Catalog
4
+ version: 0.0.1
5
+ summary: Manages product information, categories, inventory, and customer reviews in the e-commerce system.
6
+ owners:
7
+ - dboyne
8
+ entities:
9
+ - id: Product
10
+ - id: Category
11
+ - id: Inventory
12
+ - id: Review
13
+ services:
14
+ - id: ProductService
15
+ - id: CategoryService
16
+ - id: InventoryService
17
+ - id: ReviewService
18
+ ---
19
+
20
+ ## Overview
21
+
22
+ The Product Catalog subdomain is responsible for managing all product-related information in the e-commerce system. This includes product details, hierarchical categorization, inventory tracking, and customer reviews.
23
+
24
+ ### Architecture for the Product Catalog domain
25
+
26
+ <NodeGraph />
27
+
28
+ ### Entity Map
29
+
30
+ A visualization of the entities in the Product Catalog domain. Here you can see the relationships between the entities and how they are used in the domain.
31
+
32
+ <EntityMap id="ProductCatalog" />
33
+
34
+
35
+
36
+ ## Core Responsibilities
37
+
38
+ ### Product Management
39
+ - Maintain product information including pricing, descriptions, and specifications
40
+ - Support product variants (size, color, style)
41
+ - Handle product lifecycle (active, discontinued, draft)
42
+ - Manage product relationships and cross-selling
43
+
44
+ ### Category Management
45
+ - Organize products into hierarchical categories
46
+ - Support multi-level category structures
47
+ - Maintain category metadata and SEO information
48
+ - Handle category navigation and filtering
49
+
50
+ ### Inventory Management
51
+ - Track stock levels and availability
52
+ - Manage reorder points and stock alerts
53
+ - Handle inventory reservations and allocations
54
+ - Support warehouse and location management
55
+
56
+ ### Review Management
57
+ - Collect and manage customer product reviews
58
+ - Calculate review metrics and ratings
59
+ - Moderate review content
60
+ - Support review helpfulness and responses
61
+
62
+ ## Key Entities
63
+
64
+ - **Product**: Central aggregate containing all product information
65
+ - **Category**: Hierarchical product categorization system
66
+ - **Inventory**: Stock tracking and availability management
67
+ - **Review**: Customer feedback and rating system
68
+
69
+ ## Business Rules
70
+
71
+ - Products must belong to an active category
72
+ - Inventory levels affect product availability
73
+ - Reviews require verified purchases
74
+ - Category hierarchies have maximum depth limits
@@ -0,0 +1,68 @@
1
+ ---
2
+ id: BillingProfile
3
+ name: BillingProfile
4
+ version: 1.0.0
5
+ identifier: billingProfileId
6
+ summary: Stores billing-related contact information and preferences for a customer, often used for invoices and communication.
7
+
8
+ properties:
9
+ - name: billingProfileId
10
+ type: UUID
11
+ required: true
12
+ description: Unique identifier for the billing profile.
13
+ - name: customerId
14
+ type: UUID
15
+ required: true
16
+ description: Identifier of the customer this billing profile belongs to.
17
+ references: Customer
18
+ referencesIdentifier: customerId
19
+ relationType: hasOne
20
+ - name: billingEmail
21
+ type: string
22
+ required: false # May default to customer's primary email
23
+ description: Specific email address for sending invoices and billing notifications
24
+ - name: companyName # Optional, for B2B
25
+ type: string
26
+ required: false
27
+ description: Company name for billing purposes.
28
+ - name: taxId # Optional, for B2B or specific regions
29
+ type: string
30
+ required: false
31
+ description: Tax identification number (e.g., VAT ID, EIN).
32
+ - name: billingAddressId
33
+ type: UUID
34
+ required: true
35
+ description: Identifier for the primary billing address associated with this profile.
36
+ - name: preferredPaymentMethodId # Optional default for invoices/subscriptions
37
+ type: UUID
38
+ required: false
39
+ description: Customer's preferred payment method for charges related to this profile.
40
+ - name: createdAt
41
+ type: DateTime
42
+ required: true
43
+ description: Timestamp when the billing profile was created.
44
+ - name: updatedAt
45
+ type: DateTime
46
+ required: true
47
+ description: Timestamp when the billing profile was last updated.
48
+ ---
49
+
50
+ ## Overview
51
+
52
+ The BillingProfile entity consolidates billing-specific details for a customer, such as the billing address, contact email for invoices, tax information, and potentially preferred payment methods. This might be distinct from the customer's general contact information or shipping addresses.
53
+
54
+ ### Entity Properties
55
+ <EntityPropertiesTable />
56
+
57
+ ## Relationships
58
+
59
+ * **Customer:** A billing profile belongs to one `Customer`. A customer might potentially have multiple profiles in complex scenarios, but often just one.
60
+ * **Address:** Linked to a primary billing `Address`.
61
+ * **PaymentMethod:** May specify a preferred `PaymentMethod`.
62
+ * **Invoice:** Invoices are typically generated using information from the BillingProfile.
63
+ * **Subscription:** Subscriptions may use the associated customer's BillingProfile for charging.
64
+
65
+ ## Examples
66
+
67
+ * Jane Doe's personal billing profile with her home address and primary email.
68
+ * Acme Corp's billing profile with their HQ address, VAT ID, and accounts payable email address.
@@ -0,0 +1,73 @@
1
+ ---
2
+ id: SubscriptionPeriod
3
+ name: SubscriptionPeriod
4
+ version: 1.0.0
5
+ identifier: subscriptionPeriodId
6
+ summary: Represents a single billing cycle or interval within a subscription's lifetime.
7
+
8
+ properties:
9
+ - name: subscriptionPeriodId
10
+ type: UUID
11
+ required: true
12
+ description: Unique identifier for this specific subscription period.
13
+ - name: subscriptionId
14
+ type: UUID
15
+ required: true
16
+ description: Identifier of the parent Subscription this period belongs to.
17
+ - name: planId # Denormalized for easier lookup?
18
+ type: UUID
19
+ required: true
20
+ description: Identifier of the Plan active during this period
21
+ - name: startDate
22
+ type: Date
23
+ required: true
24
+ description: The start date of this billing period.
25
+ - name: endDate
26
+ type: Date
27
+ required: true
28
+ description: The end date of this billing period.
29
+ - name: invoiceId # Optional, links to the invoice generated for this period
30
+ type: UUID
31
+ required: false
32
+ description: Identifier of the invoice created for this period's charge.
33
+ - name: paymentId # Optional, links to the payment made for this period's invoice
34
+ type: UUID
35
+ required: false
36
+ description: Identifier of the payment that settled the invoice for this period.
37
+ - name: status
38
+ type: string # (e.g., Active, Billed, Paid, Unpaid, PastDue)
39
+ required: true
40
+ description: Status specific to this period (reflects invoicing/payment state).
41
+ - name: amountBilled
42
+ type: decimal
43
+ required: false # May only be set once invoiced
44
+ description: The actual amount billed for this period (could differ from plan due to promotions, usage, etc.).
45
+ - name: currency
46
+ type: string # ISO 4217 code
47
+ required: false
48
+ description: Currency of the billed amount.
49
+ - name: createdAt
50
+ type: DateTime
51
+ required: true
52
+ description: Timestamp when this period record was created (often at the start of the period).
53
+ ---
54
+
55
+ ## Overview
56
+
57
+ The SubscriptionPeriod entity tracks the state and details of a specific billing cycle within a `Subscription`. It links the subscription to the relevant invoice and payment for that interval and records the exact dates and amount billed.
58
+
59
+ ### Entity Properties
60
+ <EntityPropertiesTable />
61
+
62
+ ## Relationships
63
+
64
+ * **Subscription:** A subscription period belongs to one `Subscription`.
65
+ * **Plan:** Reflects the `Plan` active during this period.
66
+ * **Invoice:** May be associated with one `Invoice` generated for this period.
67
+ * **Payment:** May be associated with one `Payment` that settled the period's invoice.
68
+
69
+ ## Examples
70
+
71
+ * Period for Jane Doe's 'Pro Plan' from 2024-05-01 to 2024-05-31, invoiced via #INV-00123, status Paid.
72
+ * Period for Acme Corp's 'Enterprise Plan' from 2024-04-15 to 2024-05-14, status Billed, awaiting payment.
73
+ * The first period (trial) for a new subscription from 2024-05-20 to 2024-06-19, status Active, amountBilled $0.00.
@@ -7,8 +7,13 @@ summary: |
7
7
  owners:
8
8
  - dboyne
9
9
  services:
10
- - id: SubscriptionService
10
+ - id: BillingService
11
11
  version: 0.0.1
12
+ - id: PlanManagementService
13
+ version: 0.0.1
14
+ entities:
15
+ - id: BillingProfile
16
+ - id: SubscriptionPeriod
12
17
  badges:
13
18
  - content: Payment Domain
14
19
  backgroundColor: blue
@@ -19,6 +24,12 @@ badges:
19
24
 
20
25
  The Payment Domain encompasses all services and components related to handling financial transactions within the system. It is responsible for managing payments, transactions, billing, and financial records. The domain ensures secure, reliable, and efficient processing of all payment-related activities
21
26
 
22
- ## Bounded context
27
+ ### Architecture for the Subscription domain
23
28
 
24
29
  <NodeGraph />
30
+
31
+ ### Entity Map
32
+
33
+ A visualization of the entities in the Subscription domain. Here you can see the relationships between the entities and how they are used in the domain.
34
+
35
+ <EntityMap id="Subscription" />
@@ -0,0 +1,60 @@
1
+ ---
2
+ id: SubscriptionPaymentDue
3
+ version: 0.0.1
4
+ name: Subscription Payment Due
5
+ summary: Emitted when a subscription payment is due for collection
6
+ tags:
7
+ - billing
8
+ - payment
9
+ - cross-domain
10
+ badges:
11
+ - content: Cross-Domain
12
+ backgroundColor: purple
13
+ textColor: white
14
+ schemaPath: schema.json
15
+ ---
16
+
17
+ import Footer from '@catalog/components/footer.astro'
18
+
19
+ ## Overview
20
+
21
+ 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.
22
+
23
+ ## Cross-Domain Communication
24
+
25
+ This event facilitates communication between:
26
+ - **Source**: Subscriptions Domain (BillingService)
27
+ - **Target**: Payment Domain (PaymentService, FraudDetectionService)
28
+
29
+ ## Schema
30
+
31
+ <SchemaViewer title="SubscriptionPaymentDue Schema" schemaPath={frontmatter.schemaPath} />
32
+
33
+ ## Event Flow
34
+
35
+ 1. BillingService calculates when payment is due
36
+ 2. Emits `SubscriptionPaymentDue` event
37
+ 3. PaymentService receives and initiates payment
38
+ 4. FraudDetectionService performs risk assessment
39
+ 5. Payment is processed through PaymentGatewayService
40
+
41
+ ## Example Payload
42
+
43
+ ```json
44
+ {
45
+ "subscriptionId": "sub_ABC123",
46
+ "customerId": "cust_XYZ789",
47
+ "invoiceId": "inv_123456",
48
+ "amount": 49.99,
49
+ "currency": "USD",
50
+ "dueDate": "2024-02-01T00:00:00Z",
51
+ "billingPeriod": {
52
+ "start": "2024-02-01",
53
+ "end": "2024-02-29"
54
+ },
55
+ "planId": "pro-monthly",
56
+ "retryAttempt": 0
57
+ }
58
+ ```
59
+
60
+ <Footer />
@@ -0,0 +1,54 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "subscriptionId": {
6
+ "type": "string",
7
+ "description": "Unique identifier for the subscription"
8
+ },
9
+ "customerId": {
10
+ "type": "string",
11
+ "description": "Unique identifier for the customer"
12
+ },
13
+ "invoiceId": {
14
+ "type": "string",
15
+ "description": "Unique identifier for the invoice"
16
+ },
17
+ "amount": {
18
+ "type": "number",
19
+ "description": "Amount due for payment"
20
+ },
21
+ "currency": {
22
+ "type": "string",
23
+ "description": "Currency code (ISO 4217)"
24
+ },
25
+ "dueDate": {
26
+ "type": "string",
27
+ "format": "date-time",
28
+ "description": "When the payment is due"
29
+ },
30
+ "billingPeriod": {
31
+ "type": "object",
32
+ "properties": {
33
+ "start": {
34
+ "type": "string",
35
+ "format": "date"
36
+ },
37
+ "end": {
38
+ "type": "string",
39
+ "format": "date"
40
+ }
41
+ },
42
+ "required": ["start", "end"]
43
+ },
44
+ "planId": {
45
+ "type": "string",
46
+ "description": "Subscription plan identifier"
47
+ },
48
+ "retryAttempt": {
49
+ "type": "integer",
50
+ "description": "Number of retry attempts for failed payments"
51
+ }
52
+ },
53
+ "required": ["subscriptionId", "customerId", "invoiceId", "amount", "currency", "dueDate"]
54
+ }