Every gift card operation is recorded as a transaction, providing a complete audit trail.
Transaction Types
| Type | Amount | Description |
|---|---|---|
| Redemption | Negative | Customer used the gift card for a purchase |
| Refund | Positive | Amount returned to the gift card |
| Adjustment | Varies | Manual balance correction |
| Expiration | Negative | Card expired, balance zeroed |
Transaction Fields
Each GiftCardTransaction records:
- Gift Card — The associated gift card
- Sale — The related sale (for redemptions)
- User — Staff member who performed the action
- Transaction Type — Redemption, Refund, Adjustment, Expiration
- Amount — Transaction amount (negative for deductions, positive for additions)
- Balance Before — Gift card balance before the transaction
- Balance After — Gift card balance after the transaction
- Notes — Additional context
Reading Transaction History
A typical gift card transaction history might look like:
| Date | Type | Amount | Before | After | Notes |
|---|---|---|---|---|---|
| Jan 15 | Initial | +€200 | €0 | €200 | Gift card issued |
| Feb 10 | Redemption | -€75 | €200 | €125 | Sale #SALE-20250210-0001 |
| Mar 5 | Redemption | -€50 | €125 | €75 | Sale #SALE-20250305-0003 |
| Mar 20 | Refund | +€50 | €75 | €125 | Refund for returned item |
| Apr 1 | Redemption | -€125 | €125 | €0 | Sale #SALE-20250401-0002 |
Integration with Sales
When a gift card is used in a POS sale:
- The sale's
gift_card_amountis updated - The
gift_cards_usedarray stores the card ID and amount - A redemption transaction is created on the gift card
- The gift card's
current_balanceis reduced
Auditing
Gift card transactions provide:
- Complete balance history for each card
- Traceability to specific sales
- Staff accountability (who performed each action)
- Date/time stamps for all operations
This audit trail is essential for financial reporting and resolving any disputes about gift card balances.