Invoicing and Collection — From State to Document to Money
The invoice is where billing's abstractions become a legal document and an attempted charge. Everything upstream — price versions, metered totals, prorations — converges into line items a human must be able to read and a regulator must be able to audit; then the system has to actually collect, which means confronting the fact that a meaningful fraction of payments fail. Invoicing is document engineering; collection is failure engineering; revenue requires both.
The invoice is an immutable derivation — re-derivable from versioned inputs, frozen at finalization, corrected only by new documents. Collection is failure engineering: dunning that distinguishes hard from soft declines, schedules retries deliberately, and treats the payment-update email as part of the machinery.