# gift-card-balance

> (HQ #73) A form where the visitor types a gift card code and reads its balance, without buying anything: Smootify asks Shopify with a throwaway cart that carries only that code, never the visitor's cart. On success [gift-card="balance"] and [gift-card="code"] are written (§2.11) and `[form-done]` shows; an unknown, disabled or expired code shows the form error, and so does a card used up: Shopify applies no card with a zero balance, the same answer as an unknown code (checked on the starter, 2026-10-16; beta.4's is-empty never showed and is gone). Every plan. Inside smootify-cart too (next to its gift card field): the cart never takes its form, field or form states as its own, as with a smootify-product.

Status: Ready (Smootify 2.0)  
URL: https://www.smootify.io/docs/astro/reference/elements/gift-card-balance  
Updated: 2026-10-21

## Where it can go

- **Anywhere** on the page.
- **Must contain** `form`.
- **Out of place,** Smootify removes it from the page.

## What it requires

Nothing beyond Smootify: it works on every plan.

## Fields in the form

Each field’s `name` attribute tells Smootify what the field holds.

| Name | Field | What it does |
|---|---|---|
| a field named `code`, `gift card`, `gift-card`, `gift_card`, `giftcard`, `giftcardcode` or `gift card code` (any case), else the first one filled | `input type="text"` | **Required** (the not-found error without it). The gift card code, trimmed, in any case (Shopify ignores case); every other field is ignored. |

## Attributes on the element

- **It reads** `data-error-not-found`.

## Attributes inside it

| Group | Attribute name | Values |
|---|---|---|
| [Gift card](https://www.smootify.io/docs/astro/reference/attributes/gift-card) | `gift-card` | 3 |
