
Keep financial history connected after closure
Closing a customer account should not scatter its financial history. Wildo retains the billing records and their account relationships, so invoices, subscriptions and usage remain attributable after the owning workspace is removed.
Example — Close a workspace and retain its invoice history
The workspace closes, while the retained billing account still connects its invoices and subscription records for accounting follow-up.
For engineers
The core relationship registry disables parent-delete cascades for billing accounts and financial child families. The invoice scope relationship is one example:
The following selected excerpt is from resources-registry.shared.core.definitions.ts; the surrounding module and explanatory source comments are omitted.
...createPolymorphicScopeRelationships(invoiceRefsPolymorphicDeclaration, {
nature: RelationshipNature.COMPOSITION,
childOperations: { lifecycle: { onParentDelete: { enabled: false } } }, // RETAIN (compliance decision 2026-07-29) — see the billing-retention note above.
}),
The same policy connects each variant’s account to its financial children. These records are retained rather than moved behind a generic hidden/frozen resource state, because accounting still needs ordinary access to them.
Do not delete the financial anchor directly
The billing account’s internal delete handler checks subscriptions, invoice references, usage records and credit pools before allowing deletion. It requires a single addressed account and refuses deletion while dependents exist. A bulk address cannot bypass the scan by failing to name a particular account.
Use the normal scope lifecycle and subject-erasure operations, not a direct repository purge. Personal-data erasure and financial retention have different effects: the person’s identifying data can be treated while financial amounts and relationships remain. Provider-side erasure also keeps the provider customer identity resolvable for retained records.
The application still determines its applicable retention obligations and operating procedures. This mechanism preserves the declared financial relationships; it does not choose a universal legal retention duration or imply that every custom table has the same treatment.