Skip to main content

Retention and erasure

The package keeps exactly what a subject-access request and an erasure request need, and no more. The two commands are covered operationally in Data protection; this page is the matrix.

DataOn erasure (billing:erase)Retention window
Subscriptions, usage counters, credit balancesdeleted
Stored provider API keys owned by the ownerdeleted
Personal data inside webhook payloadsscrubbedpayloads aged out after billing.retention.webhook_payload_days (default 90)
Owed credit balancebanked to the audit ledger, then purgedaudit window below
Invoices (InvoiceRecord)retained, unlinked from the ownerbilling.retention.erased_financial_days (default eight years, § 147 AO / § 14b UStG)
Audit ledgerretainedbilling.retention.audit_days (default ten years)

Why invoices stay. A valid invoice has to carry the buyer's name and address (§ 14 UStG), and invoices have to be kept for years — so the right to erasure yields to a legal retention obligation (Art. 17(3)(b)). The rows are unlinked from the owner and kept; billing:prune removes them once the retention window closes.

The retention floors cannot be set below the statutory minimum without an explicit jurisdiction opt-in — a fail-closed guard, see Invariants. Weigh the default windows against GDPR storage limitation for your own case and jurisdiction.


← Back to the documentation index