> For the complete documentation index, see [llms.txt](https://docs.giftcardfactory.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.giftcardfactory.app/misc/app-emails/template-editor.md).

# Template Editor

When you send your gift card emails, you can use one of our default templates. These templates are fully editable through **Emails → Templates**.<br>

<figure><img src="https://2895247924-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcsKliv3CuXU7kN4gxX9B%2Fuploads%2FuyNQ9qwJg1UeHUNjYPQP%2Fimage.png?alt=media&amp;token=3811c419-f935-439c-93c6-3a69e0bfb77c" alt=""><figcaption></figcaption></figure>

You can use our drag-and-drop interface to modify or build new templates. Our template engine is powered by [Liquid](https://shopify.github.io/liquid/) and supports dynamic variables.

{% hint style="info" %}
All variables are exposed in **snake\_case**. For example, the shop's currency code is `shop.currency_code`, not `shop.currencyCode`.
{% endhint %}

### Variables available in every template

```
shop.name
shop.myshopify_domain
shop.email
shop.domain
shop.url
shop.currency_code
shop.currency_formats.money_format
shop.currency_formats.money_with_currency_format

customer.id
customer.email
customer.first_name
customer.last_name
```

### Gift card emails

Available in all gift card-related emails (Postman, Bulk Send, Import From File, Scheduled Gift Cards, Reminders, Rewards, etc.):

```
gift_card.code (not available in Gift Card Reminders emails)
gift_card.last_characters
gift_card.initial_value.amount
gift_card.initial_value.currency
gift_card.balance.amount
gift_card.balance.currency
gift_card.expires_on
gift_card.message
gift_card.image
gift_card.qr_code (not available in Gift Card Reminders emails)
gift_card.apple_wallet (not available in Gift Card Reminders emails)
gift_card.resend_url
```

### Gift card resend link

`gift_card.resend_url` is a secure link that re-sends the customer their gift card. When they click it, Shopify's native gift card email — containing the **full code** and a redeem link — is re-sent to the email on file. This is the recommended way to give customers their code again (Reminders emails don't include `gift_card.code`, and Shopify never re-exposes the code via API).

Use it as a button or link, for example:

```liquid
<a href="{{ gift_card.resend_url }}">Resend my gift card</a>
```

Notes:

* The link is signed and expires 30 days after the email is sent.
* The code is never in the link itself — clicking only re-emails the cardholder, so it's safe to include in any email.
* Available in App Email templates and Klaviyo events (`event.gift_card.resend_url`).
* The link points to `/apps/gcf/gift-card-resend` on the store's own domain (served via Shopify App Proxy).

### Gift card QR code

`gift_card.qr_code` renders a **QR code image** for the gift card. Drop the variable wherever you want the QR to appear in the email body:

```liquid
{{ gift_card.qr_code }}
```

The QR encodes `shopify-giftcard-v1-<code>` (where `<code>` is the gift card code). It is generated at send time and embedded directly in the email as an **inline image** — nothing is hosted externally and the raw code is never stored on our side. Because it depends on the gift card code, it is **not available in Gift Card Reminders** emails (which don't expose the code).

### Add to Apple Wallet button

`gift_card.apple_wallet` renders an official **Add to Apple Wallet** button and also attaches the pass (`gift-card.pkpass`) to the email. Tapping the button on an iPhone adds the gift card to Apple Wallet, where its QR code can be scanned at checkout (it encodes the same `shopify-giftcard-v1-<code>` value as `gift_card.qr_code`).

```liquid
{{ gift_card.apple_wallet }}
```

The pass follows Shopify's own gift card pass layout and is styled with your store's **Brand settings** (Shopify admin → Settings → Brand): the default logo next to your store name, the square logo as the pass icon, and your primary brand colours as the pass background and text colours. Stores without Brand settings get a neutral default look. The card shows its value, the recipient's name, the expiry date (when set) and the code, uppercase in groups of four just like Shopify's pass. The pass is generated and signed at send time; the button links to `/apps/gcf/wallet` on your own domain (served via Shopify App Proxy) and stays valid for 14 days. The gift card code is never stored in our database. Because it depends on the code, the button is only included in the **initial gift card email**: it is **not available in Gift Card Reminders** and is not re-created when an email is resent.

### Gift Card Postman emails

In addition to the gift card variables above, Postman emails expose the recipient and sender entered by the buyer on the product page:

```
recipient.name
recipient.email

sender.name
sender.email
```

### Store credit emails

Available in Scheduled Store Credit and Store Credit Bulk Add emails:

```
issued_store_credit.amount
issued_store_credit.currency_code
issued_store_credit.balance_after_transaction
```

### Discount code emails

Available in Discount Codes Bulk Send and Discount Codes Import From File emails:

```
discount_code.code
discount_code.discount_type
discount_code.discount_value
discount_code.starts_at
discount_code.ends_at
```

### Gift Card Refund emails

Refund emails expose information about the order and the refund itself:

```
order.number
order.id

refund.reason
refund.total_refunded
refund.shipping_refunded
refund.line_items[]
refund.line_items[0].image
refund.line_items[0].title
refund.line_items[0].amount
refund.line_items[0].price
refund.line_items[0].quantity
```

### Formatting money

Money amounts are exposed as raw numeric strings. Use the `format_money` filter together with the shop's money format to render them with the right currency symbol:

```liquid
{{ gift_card.initial_value.amount | format_money: shop.currency_formats.money_format }}
```
