json icon

Invoice Generated

v0.0.1events

Emitted when an invoice is generated for a subscription

1{
2  "$schema": "http://json-schema.org/draft-07/schema#",
3  "type": "object",
4  "title": "InvoiceGenerated",
5  "description": "Schema for invoice generated event",
6  "properties": {
7    "invoiceId": {
8      "type": "string",
9      "description": "Unique identifier for the invoice"
10    },
11    "invoiceNumber": {
12      "type": "string",
13      "description": "Human-readable invoice number"
14    },
15    "subscriptionId": {
16      "type": "string",
17      "description": "Unique identifier for the subscription"
18    },
19    "customerId": {
20      "type": "string",
21      "description": "Unique identifier for the customer"
22    },
23    "invoiceDate": {
24      "type": "string",
25      "format": "date-time",
26      "description": "Date and time when the invoice was generated"
27    },
28    "dueDate": {
29      "type": "string",
30      "format": "date-time",
31      "description": "Date and time when the invoice payment is due"
32    },
33    "status": {
34      "type": "string",
35      "enum": ["generated", "sent", "paid", "overdue", "cancelled"],
36      "description": "Current status of the invoice"
37    },
38    "lineItems": {
39      "type": "array",
40      "description": "List of items on the invoice",
41      "items": {
42        "type": "object",
43        "properties": {
44          "description": {
45            "type": "string",
46            "description": "Description of the line item"
47          },
48          "quantity": {
49            "type": "number",
50            "description": "Quantity of the item"
51          },
52          "unitPrice": {
53            "type": "number",
54            "description": "Price per unit"
55          },
56          "total": {
57            "type": "number",
58            "description": "Total price for this line item (quantity * unitPrice)"
59          }
60        },
61        "required": ["description", "quantity", "unitPrice", "total"]
62      }
63    },
64    "subtotal": {
65      "type": "number",
66      "description": "Subtotal amount before taxes"
67    },
68    "tax": {
69      "type": "number",
70      "description": "Tax amount applied to the invoice"
71    },
72    "total": {
73      "type": "number",
74      "description": "Total amount including taxes"
75    },
76    "currency": {
77      "type": "string",
78      "description": "Currency code (ISO 4217)"
79    },
80    "billingPeriod": {
81      "type": "object",
82      "description": "Billing period covered by this invoice",
83      "properties": {
84        "start": {
85          "type": "string",
86          "format": "date",
87          "description": "Start date of the billing period"
88        },
89        "end": {
90          "type": "string",
91          "format": "date",
92          "description": "End date of the billing period"
93        }
94      },
95      "required": ["start", "end"]
96    },
97    "planId": {
98      "type": "string",
99      "description": "Subscription plan identifier"
100    }
101  },
102  "required": [
103    "invoiceId",
104    "invoiceNumber",
105    "subscriptionId",
106    "customerId",
107    "invoiceDate",
108    "dueDate",
109    "status",
110    "lineItems",
111    "subtotal",
112    "tax",
113    "total",
114    "currency",
115    "billingPeriod",
116    "planId"
117  ]
118}
119
120

Details

Format
JSON Schema
Resource
events
Filename
schema.json

Versions