Gift cards
The gift card object and the allowed CRUD operations on the related resource endpoint
A gift card is a store-issued payment instrument with an outstanding balance. All gift cards must be activated before use. Rechargeable gift cards can be reloaded at any time. Single-use gift cards become redeemed after the first use, regardless of how much of the balance is used.
You can associate a gift card with a market if you want to restrict its availability to that market.
Log information
Two attributes provide additional information:
balance_log— check this attribute to browse the history of a gift card's balance changes.usage_log— check this attribute for more information about how, when, and by which order the gift card has been used.
Log retention
Both log attributes retain only the most recent 100 entries. Older entries are dropped at write time to keep the fields compact:
Balance — the most recent entries up to the cap are kept, older ones are discarded.
Usage — entries are grouped by order. The cap applies globally across all orders: the most recent entries are retained regardless of which order they belong to, and orders whose entries fall entirely outside the cap are removed.
Using gift cards as payment
Gift card redemption is managed through payment sessions. To apply a gift card to an order, create a payment session using a gift card payment setting and provide the gift card code. The session amount is automatically capped at the gift card's available balance.
Balance usage and restore
A gift card's balance is debited when the related payment authorization succeeds. Gift card sessions are captured automatically, so the session moves straight to paid and the debit can't be voided. To credit the balance back, issue a payment refund against the session's capture: the refunded amount is restored to the gift card (a redeemed single-use gift card is reactivated).
Last updated