QUANTM7 Docs
QuillObjects

Gift Card

The gift card object for balances, redemption, and card details.

The gift_card object represents a gift card or store credit. It is available on gift card display pages and through customer.wallet for balance checks.

Properties

PropertyTypeDescription
gift_card.codestringThe full gift card code
gift_card.code_last4stringThe last 4 characters of the code
gift_card.balancenumberThe remaining balance
gift_card.initial_valuenumberThe original amount when issued
gift_card.currencystringThe currency code
gift_card.enabledbooleantrue if the card is active
gift_card.expiredbooleantrue if the card has expired
gift_card.expires_onstringThe expiration date, if set
gift_card.customercustomerThe customer this card is assigned to
gift_card.sender_namestringWho sent the gift card
gift_card.personal_messagestringA message from the sender
gift_card.source_typestringHow the card was created: admin, purchase, refund, promotion, loyalty, auto

Displaying a gift card

<div class="gift-card">
  <p class="gift-card__code">{{ gift_card.code }}</p>
  <p class="gift-card__balance">Balance: {{ gift_card.balance | money }}</p>

  {% if gift_card.personal_message %}
    <blockquote>
      <p>{{ gift_card.personal_message }}</p>
      <cite>From {{ gift_card.sender_name }}</cite>
    </blockquote>
  {% endif %}

  {% if gift_card.expires_on %}
    <p class="gift-card__expiry">
      {% if gift_card.expired %}
        Expired on {{ gift_card.expires_on | date: '%d %B %Y' }}
      {% else %}
        Expires {{ gift_card.expires_on | date: '%d %B %Y' }}
      {% endif %}
    </p>
  {% endif %}
</div>

Customer wallet

The customer's wallet balance is the sum of all active gift cards and store credit:

{% if customer and customer.wallet > 0 %}
  <p>You have {{ customer.wallet | money }} in store credit.</p>
{% endif %}

On this page