Sell gift cards and give store credit
Sell gift cards on your website and take them anywhere you take payment. Give store credit or refund cancellations as credit, and neither expires.
Add a gift card like any product: Sell, Products, Add a product, Gift card, with its amount (or pay what you want). Customers buy it on your website, for themselves or as a gift: add the person’s email and they get the code once it’s paid, with a note from the buyer.
Customers pay with it at checkout: they enter the code, or tick their store credit if they’re signed in. It pays first and a card pays the rest. If it covers everything, nothing is charged to a card.
Gift cards and store credit don’t expire and have no fees. The balance is money you took and still owe in what you sell, so it stays on your books, not ours. Sell, Gift cards shows every card and store credit, who holds it, what’s left and what you owe on them all. Give store credit there, or ask the assistant “How much do I owe on gift cards?”
Give a customer store credit as a thank-you or to make something right: ask the assistant, “Give Maya $20 in store credit.” You see the amount before it goes. To refund cancellations as credit instead of to the card, turn on Refund as store credit in your cancellation policy.
Refunds go back where the money came from: what was paid with a gift card or store credit goes back onto it, and store credit is never paid out to a card. Refunding a gift card itself gives back at most what’s left on it, and the refund comes off the card: refund $10 of an unspent $50 card and $40 stays on it. Refund all that’s left and the card stops working.
Codes are long and random, so they can’t be guessed, and too many wrong tries are blocked for a minute. Anyone with a code can spend it, so customers should keep it like cash. Gift card rules differ by state, for example cashing out a small balance on request. Check yours; this isn’t legal advice.
For agents
Sell one with commerce.createProduct (type: gift_card, fulfillment: digital); a sale of it issues one gift_card grant per unit on stored_value:usd when it’s paid in full, worth the line’s price, with an 80-bit code emailed to the holder (recipient on commerce.checkout names someone else). Pay with tender on commerce.checkout, commerce.sell and commerce.previewSale: [{ code }] or [{ grantId }] for a balance the customer holds, in order; it pays one-time sales by card or in person, never a repeat, a plan or another gift card. A wrong code, an empty or void card and too many tries all answer the same words. commerce.giftCardBalance checks a code; commerce.storedValue lists the signed-in customer’s balances; commerce.giftCards lists every card and credit with what the business owes; commerce.giveCredit gives store credit (tier 3). commerce.endSale and commerce.endLines return storedMinor for what went back onto gift cards or credit; a cancellation policy with refundAs: store_credit refunds as credit.