Gift cards

Selling, redeeming, part-redeeming and checking the balance of a gift card.

A gift card is created with a code, a face value and a zero balance. It is not spendable yet.

A card is only funded when it is paid for

Creating a card records its face value but leaves it unfunded. The balance is only loaded once the sale that sells the card is actually recorded. Without this, a card could be issued, the sale voided, and the balance still spent — the shop paying for a card nobody bought.

Lifecycle — issue to depleted
1Card createdFace value recorded, balance $0, unfunded.
2Sale recordedOnly now is the balance loaded.
3Redeemedmin(amount asked, balance left).
4DepletedRefused with a clear message.
A card is created unfunded with a zero balance and only loaded once the sale that sells it is actually recorded — otherwise a card could be issued, the sale voided, and the balance still spent. Redemption takes the lesser of the amount asked for and the balance, so a card cannot go negative. Source: /api/gift-cards and /api/gift-cards/redeem. A lifecycle rather than a screen, so it is drawn as a flow.

Redeeming

Redemption takes the lesser of the amount asked for and the balance remaining, so a card can never go negative. A card with nothing left is marked depleted and is refused with a clear message rather than silently contributing zero.

Part payment

If the balance does not cover the sale, the payment screen tells you how much the card absorbs and asks for a second method for the rest. See Taking payment.

Still stuck? We answer every message.Contact support