Payment
What It Models
Payment describes a receipt, how it was collected and how the resulting money was used. Its supporting records explain processor attempts, allocations, returns, disputes and coordinated collection.
Identity and Attributes
The original collection details remain attached to the receipt. Maintained amounts describe subsequent use, while processor references and intent records support recovery of uncertain collection outcomes.
Relationships
Allocations connect receipts to invoice debt, and payment-backed credit transfers remaining receipt value into a separate credit record. Refunds and reconciliation movements explain money returned or cleared.
Invariants
Database bounds protect the financial amounts and ledger entries. Service commands establish collection eligibility, approval requirements and the permitted form of reversal.
How It Is Stored and Shared
Transactions owns receipt-related records. Staff access uses the corresponding record permissions; Commerce uses its tender and reversal service capabilities. Integration events and scheduled lookups supply processor outcomes.
Open Design Questions
Partial chargebacks, external refund reasons and the broader multi-customer receipt model remain unresolved. The implemented payment recommendations still require Andrew’s approval.