# `PhoenixKitBilling.Transaction`
[🔗](https://github.com/BeamLabEU/phoenix_kit_billing/blob/0.5.1/lib/phoenix_kit_billing/schemas/transaction.ex#L1)

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.

# `absolute_amount`

Returns the absolute amount (always positive).

# `changeset`

Creates a changeset for a transaction.

# `payment?`

Returns true if this transaction is a payment (positive amount).

# `payment_methods`

Returns the list of valid payment methods.

# `refund?`

Returns true if this transaction is a refund (negative amount).

# `type`

Returns the transaction type as a string.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
