Schema for payment transactions.
Transactions record actual payments and refunds for invoices.
- Positive amount = payment
- Negative amount = refund
Transactions are created when:
- Admin marks invoice as paid (creates payment transaction)
- Admin issues a refund (creates refund transaction)
There are no pending/failed statuses - a transaction is only recorded when the payment/refund has actually occurred.
Summary
Functions
Returns the absolute amount (always positive).
Creates a changeset for a transaction.
Returns true if this transaction is a payment (positive amount).
Returns the list of valid payment methods.
Returns true if this transaction is a refund (negative amount).
Returns the transaction type as a string.
Functions
Returns the absolute amount (always positive).
Creates a changeset for a transaction.
Returns true if this transaction is a payment (positive amount).
Returns the list of valid payment methods.
Returns true if this transaction is a refund (negative amount).
Returns the transaction type as a string.