Credit
What It Models
Credit represents value held for a customer and the application documents that spend it. Its source distinguishes a manual grant from value originating in an earlier receipt or cancellation.
Identity and Attributes
Credit attributes describe the grant, accounting scope and remaining value. Application records provide the posting and lifecycle context for each use of that value.
Relationships
Applications link credit to billed lines, while payment-backed grants link it to collected money. The customer account reads the available balance without owning the credit.
Invariants
The invariant rows separate financial bounds from use restrictions. Settlement currently omits restrictions that direct application checks, creating a recorded implementation conflict.
How It Is Stored and Shared
Transactions owns grants and applications. Staff operate through credit permissions, and Commerce can apply or create credit through the separately granted service functions.
Open Design Questions
Expiry does not update the stored status, and settlement bypasses expiry and order restrictions. A standalone grant from a memo is also absent despite that source being represented in the vocabulary.