Websites · Glossary

What is a discount code?

A discount code, also called a promo or coupon code, is a word a customer types at checkout to reduce the price of an order. The shop decides what it does, such as a percentage off, a fixed amount off or free shipping, and sets limits like a minimum spend, an expiry date or a usage cap.

Codes are the simplest promotion an online shop can run and the easiest to lose money on. Most of the cost comes from the limits a shop forgot to set.

· Co-founder

4 min read · Published

Common kinds of discount code
KindWhat it doesTypical limitBest for
PercentageTakes a share off the order, such as 10 percentMinimum spend, expiry, one use per customerWelcome offers and seasonal sales
Fixed amountTakes a set amount off, such as $15Minimum spend so small orders are not freeApologies and referral rewards
Free shippingRemoves the delivery chargeMinimum spend, delivery zonesLifting order size
Single useWorks once, often unique to one customerOne redemption in totalService recovery and influencer tracking
Product specificApplies only to named items or categoriesProduct list, expiryClearing stock and launches

How a code works at checkout

The customer types the code, the shop checks that it exists, is active, falls within its dates, has uses left and meets any minimum spend, then calculates the discount and shows it as a line before payment. The check must happen on the shop's server, not in the customer's browser, otherwise a technically minded customer can change the result. Stripe's Checkout documentation describes the same pattern, with coupons that define the discount and promotion codes that customers type to apply them.

Where codes come from

Most shops use a few kinds at once: a public code in a newsletter or banner, private codes sent to individual customers, and codes given to partners or creators so the shop can see which audience bought. Unique codes are worth the extra effort for anything valuable, because public codes spread to coupon websites within days, where they are used by customers who would have paid full price anyway.

The pricing rules

A discount must be honest about the price it is taken from. Australian Consumer Law prohibits false or misleading claims about price, which covers inflated was prices and discounts that are not really available. UK and EU rules are similar. In practice, keep a code's terms short and visible, apply the advertised discount exactly, and do not raise the base price before a promotion so the discount looks larger.

Common mistakes

No minimum spend on a fixed amount code, so a $15 code makes a $15 item free. No expiry, so an old influencer code is still costing margin two years later. Stacking several codes on one order without meaning to. Codes that fail silently, so customers abandon instead of asking why. And launching a code without deciding how you will measure whether it brought new customers or just discounted existing ones.

Where it shows up in the product

OneCraft has no discount code screen of its own. When a site needs codes, the agent builds them from the loyalty guide into the site's own database: codes can be percent, fixed or free shipping, with a minimum subtotal, start and end dates and a usage limit; the order function checks them and computes the discount on the server, the checkout shows a code field with the applied line or a plain error, and codes are made in the site's admin area. Payments run through Stripe Checkout as a direct charge on the owner's connected Stripe account, with prices read from the site's database rather than the browser, on paid plans only; the platform fee is 2 percent on Starter, 1 percent on Pro and 0.5 percent on Pro+, with Stripe's own fees on top.

Questions people ask

What is the difference between a coupon and a discount code?

In everyday use they mean the same thing. Some platforms, including Stripe, separate the two: a coupon is the discount rule, such as 10 percent off for a month, and a promotion code is the customer facing word that applies it. One coupon can have many codes, which helps track where customers came from.

Should a discount code apply before or after shipping?

Usually to the product subtotal, before shipping and tax, which is what customers expect from a percentage or fixed amount code. Free shipping codes are the exception, applying only to delivery. State it in the code's terms so customers are not surprised when the discount is smaller than they calculated.

Can customers use more than one code per order?

Only if the shop allows it. Most small shops allow one code per order to keep discounts predictable, and many tell customers so at checkout. If you run an automatic sale and also hand out codes, decide in advance whether both apply, because stacking is where promotions quietly lose money.

How do I stop discount codes leaking to coupon sites?

Use unique, single use codes for valuable offers, give each partner their own code so a leak can be traced, set expiry dates and usage limits, and require a minimum spend. Public codes will always spread; treat them as public prices and set their value accordingly.

Do discount codes need terms and conditions?

Short ones help, and any significant condition should be visible before the customer relies on the code, such as minimum spend, expiry, excluded products and one use per customer. Hidden conditions risk breaching consumer law on misleading pricing and produce angry emails when the code fails at checkout.

Make one with websites

The button opens the generator with this use case already described. Change the wording to match your own.

Create a website with OneCraft

Related questions

Sources

Written and checked by the OneCraft team. Last checked .