By the Dropship Stair team. Last reviewed: November 2026.
Learning how to create a Shopify discount code takes a few minutes: open Discounts in your Shopify admin, click Create discount, pick a code type, set the amount, and share it with your customers. The built-in tool handles every type in this guide.
Key takeaways
- A Shopify discount code is a short text code a buyer enters at checkout to get a price cut, free shipping, or a buy-one-get-one deal.
- Shopify offers four code types: percentage off, fixed amount off, free shipping, and buy X get Y.
- Every code needs usage limits, a minimum purchase rule, and an expiry date, or it will leak money.
- Test the code with a real checkout before you share it anywhere, because a broken code costs sales.
Discount codes look simple, and the setup is. The part that trips up new store owners is everything around the setup: which code type to pick, how to stop one code from eating your whole margin, and what to do when a code spreads further than you planned.
This guide covers the full creation flow in the Shopify admin, the four code types, the rules that protect your margin, and the mistakes we see most often.
What types of discount codes can you create on Shopify?
Shopify offers four discount code types, and each one suits a different job. A percentage discount works best for storewide sales and first-order offers. A fixed amount works best when you want to control the exact cost, such as five dollars off orders over fifty. Free shipping removes the most common checkout objection. Buy X get Y is the strongest tool for clearing stock and raising order value.
Percentage discounts are the easiest to understand, which is why buyers respond to them. Ten percent off feels simple, and it scales with the order, so a big cart gets a big saving. The risk is that it scales the wrong way too: on a high-value order, ten percent can be a large amount. Keep percentage codes for short campaigns, not permanent offers.
Fixed amount discounts give you exact control. Five dollars off is five dollars, whether the cart is fifty or five hundred. This makes them the safest choice for a first-order offer or a win-back email, because you know the worst case before you publish the code. Pair them with a minimum purchase so the discount never exceeds your margin on a small order.
Free shipping codes solve a different problem. Many buyers abandon a cart when shipping appears at checkout, and a free shipping code removes that friction entirely. Set a minimum order value so you are not paying to ship a five-dollar item across the country. Free shipping codes work best on stores where shipping is a real share of the order total.
Buy X get Y is the most flexible type. Buy two, get the third free. Buy a full-price item, get an accessory at half price. This type pushes order value up instead of cutting it down, which is why experienced stores use it for bundles and seasonal clear-outs. The setup takes a few more clicks, because you choose both the qualifying item and the free item, but the payoff is worth it.
| Code type | Best for | Main risk |
|---|---|---|
| Percentage off | Storewide sales and first orders | Large carts get large discounts |
| Fixed amount off | First orders and win-back emails | Can exceed margin on small orders |
| Free shipping | Removing checkout friction | Shipping costs on low-value orders |
| Buy X get Y | Bundles and clearing stock | More setup and more rules to check |
How to create a Shopify discount code step by step?
Creating a discount code in Shopify takes about five minutes once you know the screens. Open your Shopify admin, go to Discounts in the left menu, and click Create discount. Choose Discount code, then pick one of the four types. Give the code a short, readable name, such as WELCOME10, using letters and numbers only, since codes are not case sensitive and buyers will type them on a phone.
Next, set the value. For a percentage code, enter the percentage. For a fixed amount, enter the dollar amount. For buy X get Y, choose the qualifying product and the free product, plus the discount on the free item. For free shipping, choose whether it applies to all countries or only selected ones, and whether it excludes shipping rates over a set amount.
Then set the rules. Choose who can use the code: all customers, a specific customer segment, or specific customers. Set a minimum purchase requirement, either a dollar amount or a quantity of items. Set usage limits: how many times the code can be used in total, and whether one customer can use it once or more than once. Finally, set the active dates, with a start date and an end date, and save.
Before you share the code, test it. Open your store in a private browser window, add a product to the cart, and enter the code at checkout. Check that the discount applies, that the total is what you expect, and that the code stops working when the rules say it should, such as below the minimum purchase. If anything looks wrong, fix it in the admin before the code goes public.
How do you set rules that protect your margin?
Rules are what separate a profitable promotion from a costly one. The three rules that matter most are minimum purchase, usage limits, and expiry dates, and every code you create should have all three. A code with no minimum purchase invites tiny orders that cost more to ship than they earn. A code with no usage limit can spread on coupon sites and run for months. A code with no expiry date becomes a permanent discount you never planned.
Minimum purchase is the simplest protection. If your average order is forty dollars and your margin is thirty percent, a ten percent code on a twenty-dollar order leaves almost nothing after shipping and fees. Set the minimum just above your average order value to push buyers to add one more item. A minimum of fifty dollars on a store with a forty-dollar average order is a reasonable starting point.
Usage limits protect you from the code going viral. Set a total usage cap for public codes, such as the first one hundred uses, and a once-per-customer limit for first-order codes. This keeps the campaign budget predictable. If the code hits its cap early, that tells you the offer worked, and you can decide whether to extend it on purpose.
Expiry dates close the loop. A seven to fourteen day window creates urgency and gives you a clean end point. If you run the same code every month, buyers learn to wait for it, which trains them never to pay full price. Rotate the code name and the offer so each campaign feels fresh.
What mistakes should you avoid with discount codes?
The most common mistake is stacking discounts without checking the math. Shopify applies one discount code per order by default, but automatic discounts can combine with a code, and that combination can cut deeper than you planned. Check your automatic discounts before launching a code campaign, and test a checkout with both active to see the real total.
The second mistake is sharing a code with no audience limit. A code posted on a public coupon site will be used by people who were never your target, and it will keep working until it hits a limit or an expiry date. If a code is meant for email subscribers, limit it to that customer segment in the admin instead of trusting buyers not to share it.
The third mistake is forgetting about taxes and shipping. A percentage discount applies to the product price, not to shipping or taxes, which is usually what you want. But a free shipping code still leaves you paying the carrier, so check your shipping rates before you offer it storewide. A code that looks generous on paper can be expensive once delivery is counted.
The fourth mistake is never measuring the result. After a campaign ends, check how many orders used the code, what the average order value was, and how many of those buyers came back. A code that brings in one hundred orders at a loss is worse than a code that brings in twenty orders at a profit. Our guide to the Shopify discount strategy explains how to judge whether a promotion actually made money.
How do you test a discount code before sharing it?
Testing takes two minutes and saves real embarrassment. Create the code, then open your store in a private window so you are not signed in as the store owner. Add the cheapest product to the cart, then try the code below the minimum purchase to confirm it is rejected. Add enough to pass the minimum, apply the code, and check the discount math line by line. Then try the code a second time on a fresh cart if it is meant to be single use.
Also test on a phone, since most buyers will enter the code there. Long codes with mixed letters and numbers are easy to mistype on a small keyboard, so keep codes short and readable. If the code name is confusing when read aloud, pick a simpler one.
How do discount codes fit into your wider promotion plan?
A discount code is one tool, not a strategy. The stores that use codes well pair them with email and loyalty. A first-order code goes into the welcome email, a win-back code goes to buyers who have not ordered in ninety days, and a loyalty reward goes to repeat buyers through an app. Each code has a job, an audience, and an end date, and none of them runs forever.
If you want to go deeper, our list of the best Shopify apps for discounts covers tools that automate code creation, set up automatic discounts, and track which codes actually drive profit.
Frequently asked questions
How long does it take to create a Shopify discount code?
Creating a basic discount code takes about five minutes in the Shopify admin, including setting the value, minimum purchase, usage limits, and dates. Testing it with a real checkout adds two more minutes. Plan for ten minutes total the first time, and less once you know the screens.
Can I create a discount code without an app?
Yes, you can create discount codes with Shopify built in, and no app is needed for the four standard types. Apps only become useful when you want automatic discounts, scheduled campaigns, or advanced rules such as discounts based on cart contents or customer tags.
Can customers use two discount codes on one order?
No, Shopify allows only one discount code per order at checkout. A buyer cannot stack two codes, though an automatic discount can sometimes combine with a code. Check your automatic discounts before a campaign so the combined saving does not cut deeper than you planned.
What is the difference between a discount code and an automatic discount?
A discount code needs the buyer to type it in at checkout, while an automatic discount applies by itself when the cart meets the rules. Codes suit targeted campaigns and email offers, while automatic discounts suit storewide sales where you want every buyer to get the deal without typing anything.
How do I stop a discount code from being shared publicly?
Limit the code to a specific customer segment, set a total usage cap and a once-per-customer limit, and give it a short expiry date. These three rules keep the damage small even if the code spreads. For sensitive offers, use a unique code per customer instead of one shared code.
Last reviewed: November 2026.