Invoice events
The policy events that fire across an invoice's lifecycle
Overview
Invoices emit standard policy events at each significant transition. Subscribe to these the same way you subscribe to any other policy event, for example to send a notification with the invoice PDF attached, or to reconcile against an external system.
Events
Every event carries the invoice_id and the timestamp.
| Event | Written when | Also carries |
|---|---|---|
invoice_created | The invoice is finalised and takes its reference, moving from draft to open | reference |
invoice_sent | The invoice is dispatched to the policyholder | |
invoice_paid | The invoice is marked paid, either by a successful payment or by hand | payment_id, external_reference |
invoice_voided | The invoice is voided | reason |
invoice_refunded | A credit note is raised against this invoice. Written on the original invoice | refund_invoice_id, the credit note |
invoice_uncollectible | The invoice is written off as bad debt | reason |
Payloads are deliberately small.An event carries the invoice ID and the few fields above,
never the line items and never the PDF.invoice_createdin particular has no document file
ID, because the invoice is rendered after the event is written.
Transitions are idempotent where they can be.Redelivering the same payment against an
already-paid invoice does not write a secondinvoice_paid. Build consumers for at-least-once
delivery regardless.
Updated 4 days ago
Did this page help you?