Freeframe

How to Sell Gift Cards on Your Website

Sell holiday gift cards from a static site with a Stripe payment link, collect the recipient's name and message, send the card and track redemptions.

By
Updated · 7 min read

The quickest way to sell gift cards from a small website is a Stripe payment link: create one product per gift card value (or one where the buyer chooses the amount), add custom fields for the recipient's name and message, send buyers to a thank-you page on your site, then email each gift card yourself and keep a simple register of codes. It takes an afternoon, needs no store software and works on a plain HTML, Astro, Next.js or WordPress site. Do it now: gift cards are a last-minute Christmas present, and a page that's been live for a few weeks is easier for customers to find than one added on December 20.

What you need#

  • A Stripe account. At the time of writing Stripe's US pricing for domestic cards is 2.9% + 30¢ per successful transaction, with no monthly fee, so a $50 gift card costs you $1.75.
  • A page on your site for gift certificates, such as /gift-certificates. The Hearth country inn template already has one; on any other template, copy an existing content page.
  • A gift card design: a PDF or image with your logo, a space for the recipient's name, the value, and a code.
  • Short terms: how long the gift card lasts, what it can be spent on, and whether it can be used in part.

Step 1: Decide what kind of gift card you're selling#

There are two common kinds, and the choice affects the checkout and how you word your terms.

  • A fixed amount of money ("$50 to spend"), which the recipient can use on anything you sell.
  • A specific service ("a two-course dinner for two" or "a 60-minute massage"), which is easier to buy as a present and often sells better. Say what happens if the price of that service goes up later.

Then check the rules before you print anything. Under the federal CARD Act, gift cards generally can't expire within five years, the expiration date must be clearly shown, and fees for not using a card are tightly limited (FTC gift card guidance). Some states go further: several limit or ban expiration dates, and California makes businesses pay out small remaining balances in cash on request. The simplest terms are also the friendliest: no expiration date and no fees. This is general information, not legal or tax advice, so ask your accountant or attorney how your state treats gift cards, including when sales tax is due and what happens to balances that are never used.

Step 2: Create the products in Stripe#

In the Stripe Dashboard, go to Product catalog and click Add product. For fixed values, make one product per gift card, such as "Gift card, $25", "Gift card, $50" and "Gift card, $100", each with a one-time price.

To let the buyer type their own amount, Stripe's pay-what-you-want guide explains the steps: open More pricing options, choose One-off, then pick Customer chooses price as the pricing model. You can add a suggested price and set minimum and maximum limits, for example $10 to $500. The guide lists the catches: a customer-chooses-price link can only hold that one item with a quantity of 1, and it can't use promotion codes.

From each product, create a payment link. Stripe's Payment Links documentation covers the basics; the options worth setting for gift cards are in the customization guide:

  • Add custom fields. Add a text field labeled "Recipient's name" and another labeled "Message for the card". Text fields take up to 255 characters, which is enough for a short message. A dropdown field (up to 10 options in the Dashboard) is handy for "Send the gift card to me" or "Send it straight to the recipient".
  • Collect customer names so you know who bought it.
  • Let customers adjust quantity on fixed-value gift cards, so someone can buy three $25 gift cards at once.
  • Require agreement to your terms. Once you've set a terms of service URL in Stripe's Public details settings, you can make buyers check a box accepting it. Point it at your gift card terms.

Stripe's guide also warns not to use custom fields for sensitive personal data, so ask for a name and a message, not a date of birth or an address you don't need.

Step 4: Send buyers back to your website#

By default the buyer sees Stripe's own thank-you message after paying. It's better to send them back to your site so they know what happens next. In the payment link's After the payment settings, under Confirmation page, you can either write a custom message or redirect to a URL of your choice, as described in Stripe's after-payment guide.

Make a page such as /gift-cards/thank-you that says, plainly:

  • that the payment went through and Stripe has emailed a receipt;
  • when the gift card will arrive ("within one business day, by email") and who it goes to;
  • how to get in touch if it hasn't arrived.

Add <meta name="robots" content="noindex"> to that page so it doesn't turn up in search results, and leave it out of your sitemap.

Step 5: Put the gift cards on your page#

The simplest option is a normal link styled as a button. Copy the payment link from Stripe and use it like any other link:

html
<a
  href="https://buy.stripe.com/your-link-id"
  class="inline-flex rounded-full bg-brand-600 px-6 py-3 font-semibold text-white hover:bg-brand-700"
>
  Buy a $50 gift card
</a>

This works the same in every Freeframe stack, including WordPress, where you can paste the address into a Buttons block. If you'd like a Stripe-styled button or card instead, open the link in Stripe and click Buy button to get an embed code: a <script> tag that loads https://js.stripe.com/v3/buy-button.js and a <stripe-buy-button> element. Stripe's buy button guide notes that if your site has a Content Security Policy, it needs to allow https://js.stripe.com in both script-src and frame-src. A plain link needs nothing extra, which is one reason to start there.

On the page itself, show each gift card with its value, what it's good for, how it's delivered and that it doesn't expire. A line of terms under the buttons ("Never expires. No fees. Can be used in part.") answers most questions before they're asked. If your site's contact form works, link to it for anything unusual, such as a gift card for a specific room or treatment.

Step 6: Send each gift card and keep a register#

Payment links don't create gift card codes, so you send each gift card yourself. To get an email for every sale, Stripe's after-payment guide says to update the notification preferences in your Personal details settings; otherwise you only get an email after your first payment. Each payment's details page in the Dashboard shows the custom fields the buyer filled in.

For each sale:

  1. Give the gift card a code that's hard to guess, such as HRTH-7KQ2-M9XD, rather than GIFT1, GIFT2.
  2. Add the recipient's name, the value and the code to your design, and save it as a PDF.
  3. Email it to the buyer or the recipient, as they asked.
  4. Record it in a spreadsheet: code, value, buyer, recipient, date sold, Stripe payment ID, and a column for each time it's used and the balance left.

The register is what you check when someone turns up with a gift card, and it's what stops the same code being spent twice. If sales take off, the after-payment guide also mentions connecting Stripe to tools such as Zapier to add each sale to a spreadsheet automatically.

Step 7: Refunds and unused gift cards#

If a buyer changes their mind, refund the payment from the Payments page in Stripe: click the menu next to the payment, choose Refund payment, and mark the gift card as canceled in your register. Stripe's after-payment guide says refunds typically take 5 to 10 business days to reach the customer's bank.

Keep the register even for cards nobody has used. Some states treat long-unused balances as unclaimed property, which is one more reason to ask your accountant. Whatever you decide, put your terms on the gift card itself and on the website, and stick to them.

Before the holidays: a quick checklist#

  • Test the whole journey in Stripe's test mode: buy a gift card, fill in the fields, land on the thank-you page.
  • Buy one real gift card with your own card, then refund it.
  • Link to the gift cards page from your home page and main navigation for November and December.
  • Put the last date for sending gift cards in time for Christmas on the page, and an out-of-office line for the days you won't be checking email. Our post on holiday hours covers the rest of the season's updates.
  • Add the page to your sitemap and ask Google to index it in Search Console, as described in our SEO docs.

When you want something more automatic, with codes generated and balances tracked for you, that's the point to look at a full online store or your card terminal provider's own gift card service. For most small businesses, a payment link, a thank-you page and a well-kept spreadsheet will carry the whole holiday rush.

About the author

Founder of Freeframe

Paul Peery runs Freeframe, which publishes complete multi-page website templates in HTML, Next.js, Astro, Nuxt and WordPress, and writes about getting small websites built, launched and kept up to date.

Get new templates by email

An email when new templates come out. Confirm by email, unsubscribe any time. How we use your address

Templates for this

Bistro website template preview

Bistro

Business

A warm, high-end website for a restaurant, café or wine bar.

HTML + TailwindNext.js (paid)Astro (paid)Nuxt (paid)WordPress (paid)

HTML free · Next.js, Astro, Nuxt & WordPress $19

7 pages · 390 KB

Documentation

Keep reading