How to Sell Gift Cards Online Without Making Up the Codes by Hand
To sell gift cards online, your site charges for the card, emails a code to whoever's receiving it, and that code gets used in a single purchase — without you making it up or tracking it yourself.
Octavio roasts coffee in Coatepec and sells 250 g, 500 g, and one-kilo bags online. Every November the same messages start rolling in: “Do you have gift cards? It’s for the office gift exchange.” Until last year, he sold gift cards out of a notebook: someone would deposit $500, he’d make up a code — OCTA500-14 — send it over WhatsApp, and write it down.
It worked until a code got used twice. The person who received it forwarded it to her sister “so she could see how nice it was,” and both of them tried to use it. Octavio gave away $500 in coffee rather than look bad. What he did by hand — making up the code, sending it, keeping track of whether it had already been used — your site can do for you.
What is a gift card in an online store?
A gift card is a code worth a fixed amount in your store: someone pays for it today so someone else can spend it later. On a Proyecta site that sells online, the gift card is just another product, with its own price, and you don’t make up the code — it’s generated automatically once the payment is confirmed.
Each code is 12 characters in three groups, like K7PM-Q2XD-9HTA. It never uses 0, O, 1, or I, so no one mixes them up when reading it out over the phone, and no one can guess one.
How does the card reach the person receiving it?
By email, as soon as the payment is confirmed. When someone clicks buy on a gift card, the site asks “Who is this card for?” and requests the recipient’s email, name, and a message.
If the buyer entered someone else’s email, two emails go out. The recipient opens one that says “A gift for you,” with the amount, the message, who it’s from, and the code. The buyer gets a copy with the same code — which saves Octavio the “it never arrived” calls: if the recipient’s email bounces or lands in spam, the buyer can just forward it along.
All three fields are optional. If the buyer leaves the email blank, the code goes to them instead — exactly what the aunt who wants to print it out and tuck it into a bow-tied envelope needs.
What happens if you get paid by bank transfer?
The code goes out once the order is fully paid, not before. If someone pays by card, that’s instant. If they pay by bank transfer or cash, it happens when you open the order and use “Record payment” with what you actually received.
In the meantime, the order shows the card with the note “The code is issued once payment is confirmed.” If the deposit never shows up, there’s no loose code left over for you to chase down later.
How does the code get used?
The recipient goes to your site, picks out what they want, and at checkout opens “Have a discount code?” and types it in. It’s good for a single purchase, and the email tells them that up front. If the code gets forwarded around, like with the two sisters, whoever uses it first gets it — it won’t apply for the second person.
Three rules, and all three matter when you’re choosing your amounts:
- If the purchase costs more than the card, the difference gets paid like any regular purchase.
- If it costs less, the difference isn’t saved for later. A $500 card used on a $180 bag leaves $320 unspent.
- Only one code per purchase. If you’re running an automatic promotion that day, the purchase gets whichever discount is bigger — they don’t stack.
What amounts should your gift cards be?
The size of a real purchase, or a little under — never over. A card that falls short means the customer covers the difference; one that leaves money over means someone who met you through a gift ends up losing money.
Octavio started with the usual round numbers: $300, $500, and $1,000. He lined them up against his prices — 250 g for $180, 500 g for $320, one kilo for $590 — and saw the problem. With the $300 card, whoever buys the small bag loses $120. Almost no one would spend the full $1,000 card: his orders run around $500.
He settled on three: the $300 one, which covers the half-kilo bag if you add $20; the $500 one, which lands exactly on a small bag plus a medium; and the $590 one, which he calls “the kilo card” on his site. That’s the one that sells best, because whoever’s giving it knows exactly what they’re giving.
Can you sell gift cards at a discount?
Yes, and the card doesn’t lose value. If you put the $500 card on sale for $450 in November, the buyer pays $450 and the card is still worth $500: the code carries the full price, not the discounted amount charged for it. So you can advertise “$500 in coffee for $450” and deliver exactly that, without the recipient discovering at checkout that their gift was worth less.
Where do you see the cards you’ve sold?
In two places. On the order, the line item reads “Gift card” and who it’s for, along with the buyer’s message and each code with its value. If the recipient can’t find theirs, you look it up there and send it over.
Every card also shows up in your Coupons list, because under the hood that’s what it is: a fixed-amount coupon that can only be used once. That’s where you see whether it’s been spent — it reads 0/1 used or 1/1 used.
That list also handles the customer who walks into your shop with the code on their phone. You look it up in Coupons: if it reads 0/1, you deduct the amount at your register and hit Deactivate, so the same code can’t be used again on the site.
What happens if someone asks for a refund?
If you refund the card, its code deactivates automatically. No one ends up with both the money back and a live code.
One catch: it deactivates even if it’s already been used. If the card shows 1/1 used, the coffee has already left your roastery — refunding the buyer at that point means giving the bag away for free. Check Coupons before refunding any card.
Before you publish your amounts, run this test
For every amount you’re thinking of selling, picture a real purchase from your store that spends it in full or goes just a little over. If nothing comes to mind, swap that amount for the price of your best-selling product.
Then describe your store to Proyecta exactly like that: “a store for my coffee from Coatepec, with 250 g, 500 g, and one-kilo bags, and $300, $500, and $590 gift cards that get sent by email.”
Once your site is live, click buy on a card: it should ask you “Who is this card for?” If it doesn’t, ask it to make it a gift card instead of a regular product. The site handles the rest: the code, both emails, and keeping track of which ones have already been used. Get started at proyecta.dev.