How to Add a Discount Code to Your Online Store

A discount code is a short code a shopper types at checkout to get money off an order — a percentage off, a fixed amount off, or free shipping. It is one of the simplest marketing tools a small store has: it turns a hesitant visitor into a buyer, brings back an abandoned cart, and rewards a loyal customer, all without changing your products or your prices for everyone.

Most stores set codes up badly. They offer too much, leave codes running forever, or hand out a code on the homepage so every visitor expects one. This guide shows you how to add a discount code to your online store properly: how to create it, how to set the rules, how to share it, and how to protect your margin.

What a Discount Code Is, and When to Use One

A discount code is a code a shopper enters at checkout, usually in a field labelled “Discount code” or “Promo code”. When the code is accepted, the order total drops by the amount you set. The code can be a percentage, such as 10% off, a fixed amount, such as £5 off, or free shipping, sometimes combined with a discount.

Use codes for a clear purpose, not as a habit. Good reasons include winning back an abandoned cart, rewarding a first order, clearing slow stock, celebrating a launch or a season, and thanking a repeat customer. A bad reason is “because every store does it”. A store that always has a code running trains its customers to never pay full price, and every order then carries a discount the store did not need to give.

Before you create a code, decide what it should achieve and what it may cost. A 10% code on a £50 order costs you £5. If a hundred people use it, that is £500. Ask whether those hundred orders would have happened anyway, and whether the code is buying new sales or just discounting sales you already had.

Create the Code in Your Store Platform

Every store platform has a coupons or discounts section, and the steps are similar on all of them. On Shopify, go to Discounts in the admin and click Create discount. On WooCommerce, go to Marketing, then Coupons, and click Add coupon. On Wix, Squarespace and most other platforms, look for Discounts, Coupons or Promotions in the store settings.

First, give the code a name for yourself and a code for the customer. The internal name is only for your admin — “Welcome 10% November” — while the code is what the customer types, such as WELCOME10. Keep codes short, easy to type and easy to remember. Avoid confusing characters: the letter O and the number 0 look alike, as do the letter I and the number 1. Uppercase letters are standard, and most platforms treat codes as case-insensitive.

Next, choose the discount type. A percentage discount works well for most stores because it scales with the order: 10% off a £20 order is £2, and 10% off a £200 order is £20. A fixed amount works well when you want to cap the cost, such as £5 off orders over £40. Free shipping works well when delivery cost is the reason people abandon their carts, and it often costs you less than a percentage discount on a large order.

Then set the rules. Decide whether the code applies to the whole store, to specific products, or to a specific collection. Decide the minimum order value, so a £5 code cannot be used on a £6 order. Decide the usage limit: once per customer, or a total number of uses, such as the first 100 orders. And always set an end date. A code with no end date is a code that will still be circulating a year from now, on coupon sites you have never heard of.

Save the code, then test it yourself. Add a product to the cart, type the code at checkout, and check the discount applies correctly. Test the limits too: try it on a product it should not cover, and on an order below the minimum, and confirm it is refused. A code that gives 50% off instead of 10% because of a typing mistake is an expensive lesson.

Share the Code Where It Will Work

A code only works if the right people see it at the right moment. Share it where the customer is already close to buying.

For new visitors, a small pop-up or banner offering a first-order discount in exchange for an email address works well, but keep it restrained: show it once, after a few seconds, and let the visitor close it easily. A pop-up that appears the instant the page loads will annoy more people than it converts.

For abandoned carts, send the code by email an hour or two after the cart is left, not immediately. The email should say what was left behind and offer the code as a reason to come back. One follow-up email is enough; a chain of three discount emails teaches customers to abandon carts on purpose.

For loyal customers, send the code personally, by email or by message, with a reason: a birthday, a thank-you after a third order, or early access to a sale. A personal code feels like a reward. A public code feels like a price cut.

For social media, share the code in a post or a story with a clear end date, and link it to the product or collection it covers, not to your homepage. A code shared without a link is a code people forget.

Protect Your Margin

Discounts are easy to give and hard to take back, so protect your margin before you publish a code.

Set a minimum order value that keeps the discount sensible. A 10% code with a £30 minimum on a store where the average order is £35 will cost you little. The same code with no minimum on a store full of £5 items will eat your profit on every sale.

Limit codes to one per order. Most platforms do this by default, but check. Two codes stacked together — 10% off plus free shipping plus a sale price — can turn a profitable order into a loss.

Do not discount your best sellers. A product that already sells well does not need a code. Use codes on slow stock, on new products you want people to try, or on first orders, where the discount buys a customer, not just a sale.

Watch for codes leaking onto coupon sites. Once a code is public, it will be copied. If you see a code you meant for one email being used hundreds of times, end it and create a new one. Short-lived codes with clear end dates leak less than permanent ones.

Measure Whether the Code Worked

After a code has run, measure it. Your platform’s discount report will show how many times the code was used, how many orders it touched, and how much it cost you in discounts given. Compare that with the orders themselves: how many were first orders, how many were repeat orders, and what the average order value was compared with orders that used no code.

Judge a code by the profit it brought, not by the number of times it was used. A code used a hundred times that brought a hundred orders you would have had anyway is a loss. A code used twenty times that brought twenty new customers who came back is a win. If you cannot tell which one it was, the code was not measured well enough — next time, use a separate code for each channel, so you can see which one earned its keep.

A simple rule: if a code did not bring new customers, larger orders or faster sales, do not run it again. If it did, run it again with the same rules, and stop the moment it stops working.

Common Discount Code Mistakes

The most common mistake is a code with no end date, which keeps discounting orders long after the promotion ended. The second is a code that is too generous: 25% off everything, all the time, is not a promotion, it is a price cut, and it is very hard to reverse.

The third is putting a code on the homepage for everyone to see, which teaches every visitor to expect a discount before they buy. The fourth is a code that is hard to type or hard to find at checkout, which frustrates the very customers it was meant to please. And the fifth is running several codes at once with overlapping rules, so neither you nor the customer knows which one applies.

If your prices themselves need work before you start discounting, read our guide to creating a simple pricing page for a small business website — a clear price page does more for sales than a discount code ever will, and a code on top of a confusing price is money wasted.

A Short Checklist for Every Code

Before you publish a code, run through this list. Give it a clear purpose and a single audience. Choose the discount type that fits that purpose. Set the products it covers, the minimum order value, the usage limit, and an end date. Test it yourself at checkout, including the cases where it should be refused. Share it where the customer is close to buying, with a link to the right page. And after it ends, measure what it brought and decide whether to run it again.

The Bottom Line

A discount code is a small tool with a large effect on your margin. Create it in your platform’s discounts section, keep it short and easy to type, set a minimum order, a usage limit and an end date, and share it with the people it was made for. Measure what it brings, and stop the codes that only discount sales you already had. Used that way, a code buys you customers. Used carelessly, it just buys you smaller orders.

Leave a Comment