Aurelia Hub Documentation

Gift Card Management

Last updated: 22. February 2026

Issue, track, and manage gift cards for your jewelry store.

Accessing Gift Cards

Navigate to Gift Cards > Gift Cards.

Creating a Gift Card

  • Code — Unique gift card code (auto-generated if blank, format: GC-YYYYMMDD-XXXXXXXX)
  • Initial Amount — Face value of the gift card
  • Current Balance — Remaining balance (auto-set to initial amount)
  • Status — Active (default), Used, Expired, Cancelled
  • Purchaser Customer — Who bought the gift card
  • Recipient Customer — Who receives/uses the gift card
  • Sale — Linked to the original purchase sale
  • Issued By — Staff member who created the card
  • Activated At — Auto-set to creation time
  • Expires At — Optional expiration date
  • Metadata — Additional data (JSON)

Gift Card Statuses

Status Description Can Redeem?
Active Valid and has balance Yes
Used Balance fully redeemed No
Expired Past expiration date No
Cancelled Manually cancelled No

Gift Card Lifecycle

Created (Active, full balance)
    ↓
Partial Redemption (Active, reduced balance)
    ↓
Full Redemption (Used, zero balance)
    or
Expired (if expiry date passes)
    or
Cancelled (manually by staff)

Validation Rules

A gift card is valid (isValid()) when:

  1. Status is "Active"
  2. Current balance > 0
  3. Not expired (no expires_at or expires_at is in the future)

Operations

Redeem

redeem(amount, sale, user, notes) — Deduct amount from balance during a sale:

  • Validates the card is valid and has sufficient balance
  • Reduces current_balance
  • Changes status to "Used" if balance reaches zero
  • Creates a GiftCardTransaction record (type: "redemption")

Refund

refund(amount, sale, user, notes) — Add amount back to the card:

  • Increases current_balance
  • Reactivates "Used" cards to "Active" if balance > 0
  • Creates a GiftCardTransaction record (type: "refund")

Cancel

cancel(user, notes) — Cancel the gift card:

  • Sets status to "Cancelled"
  • Creates an adjustment transaction zeroing the balance

Expire

expire() — Mark as expired:

  • Only works on "Active" cards
  • Sets status to "Expired"
  • Creates an expiration transaction

Dashboard Integration

The Gift Card Stats Widget shows:

  • Active gift cards count
  • Total outstanding balance
  • Recently issued cards
  • Cards expiring soon

Soft Deletes

Gift cards use soft deletes — they can be archived without losing historical data.

Best Practices

  1. Set expiration dates — Encourage redemption with reasonable expiry periods
  2. Track both purchaser and recipient — Important for customer relationship management
  3. Monitor outstanding balance — Understand your liability
  4. Review expiring cards — Notify recipients before expiration
  5. Use unique codes — Auto-generation ensures uniqueness

Was this article helpful?