A DunningEvent logs one step in chasing a payment that did not go through. Each event is tied to a subscription and the specific failed invoice via stripeInvoiceId, and carries a level that marks how far the escalation has progressed — first notice, second notice, and so on. The emailSentAt time shows when the customer was last warned, and createdAt records when the step was raised. Keeping these as discrete events gives the platform a clear, auditable trail of every reminder before a past-due subscription is downgraded or suspended.
Technical section
Data model, API, and internals — visible to developers.
