By the Dropship Stair team. Last reviewed: November 2026.
Key takeaways:
- How to create a discount code on Shopify starts in Discounts, where you pick one of four types, choose Discount code as the method, and fill in one form from top to bottom.
- Pick the type first, because Shopify will not let you change a saved code from one type to another.
- A code only works when every setting agrees: the products it covers, the minimum spend, who can use it, how many times, and the dates it runs.
- Test every code with a real cart before you email it.
Learning how to create a discount code on Shopify takes about ten minutes once you know the form. Go to Discounts, click Create discount, pick one of four types, choose Discount code as the method, set the value and the rules, and save.
Discounts are one of the fastest ways to lift sales, and one of the easiest ways to confuse buyers. A code that does not work at checkout costs more than the sale. It costs the buyer, who may never come back. The steps below follow Shopify’s Help Center and were checked in November 2026.
How to create a discount code on Shopify: what are the four types?
Shopify offers four types of discounts, and you pick one before you fill in anything else. The type decides what the code takes money off, and Shopify will not change it once the code is saved.
Amount off products takes a percentage or a fixed amount off the products or collections you choose, such as 20% off all hoodies. Amount off order takes the same discount off the whole cart once the conditions are met, such as $10 off orders over $75. Neither amount-off type takes anything off shipping.
Buy X get Y gives shoppers a free or discounted item when they buy others, such as buy two shirts and get the third free. Shopify never adds the free item to the cart by itself. The shopper has to add it. Free shipping removes the shipping charge, to every country or only the ones you pick. Our guide to the best Shopify apps for email marketing shows how to pair codes with the emails that deliver them.
How do you create a discount code step by step?
Create a discount code in one form, filled in from top to bottom. Open your Shopify admin, go to Discounts, and click Create discount.
First, choose Discount code under Method. This is the setting that decides whether shoppers type a code or Shopify applies the discount for them. Type a code, such as FALL20, or click Generate random code. Keep the code short, easy to spell, and free of special characters. A poster needs a word people can type from memory. A code in an email can be random, since the shopper copies it.
Next, set the discount value. Under Discount value, choose Percentage or Fixed amount and enter the number. A product code also asks which products or collections it covers, so pick them now. Then set a minimum under Minimum purchase requirements: a purchase amount or a quantity of items. Only items the code covers count toward a minimum, and the amount counts product prices after any other product discounts, without shipping or taxes.
Then choose who can use it under Eligibility: all customers, specific customers, customer segments, or markets. Cap the uses under Maximum discount uses: a total number, one use per customer, or both. Tick the other kinds of discount it may combine with under Combinations. Set a start date under Schedule, click Set end date if the code should expire, and click Save. The dates follow your store’s time zone, printed beside each date.
Buy X get Y asks what the shopper buys and what they get, in place of a value. The item they get can be free, or a percentage or amount off. Free shipping asks which countries it covers. Shopify’s Sidekick assistant can also fill in an amount-off or free shipping code from a sentence, but nothing is saved until you click Save.
What is the difference between a discount code and an automatic discount?
A discount code is typed by the shopper, usually at checkout. An automatic discount applies itself in the cart and at checkout once the cart qualifies, and the shopper sees its title instead of a code.
Codes suit an email, a creator partnership, or a poster, where the shopper carries the code to the store. Give each channel its own code, and the Sales by discount codes report shows how often each code was used. Automatic discounts suit a store-wide sale, where you want every qualifying cart to get the deal with no typing. A store can run up to 25 automatic discounts at once.
You can run both at the same time, but only when each one’s Combinations setting allows the other. If a shopper sees a message that a code could not be used together with another discount, Combinations is the setting to check. When in doubt, keep it simple: one offer per cart, clearly named.
Which settings stop a discount code from working?
Five settings turn shoppers away from a code that exists and is active. Check them in this order.
Eligibility is the first suspect. A code tied to a customer segment applies only to existing customers, since first-time shoppers join a segment only after their first order. A welcome code is safer set to All customers with one use per customer. Minimum purchase requirements are second: only covered items count, and shipping and taxes do not. Schedule is third: the dates follow your store’s time zone.
One use per customer is fourth. Shopify counts uses by email address or phone number, so a shopper who used the code once is turned away. Combinations is fifth: if the code cannot combine with a discount already in the cart, Shopify keeps the best combination it can and drops the rest. None of Shopify’s checkout messages names the setting that stopped the code, so test it yourself before the email goes out. See our guide on how to handle Shopify refunds for what to do when a discount causes a return.
How do you test a discount code before you share it?
Test every code as a shopper who should qualify, using a cart that meets the minimum with the right products. Open the store in a private browser window, add the products, and type the code at checkout. If it does not apply, read the message Shopify shows, because each one points at a different setting.
Enter a valid discount code means no active code has that name, so check the spelling and the schedule. A message that the code is not valid for the items in your cart points at the cart, so check the products the code covers and its minimum. A message that it could not be used together with your existing discounts comes from Combinations. Fix the setting, save, and test again. Do this for every code, every time.
Also test the code the way your shoppers will use it. If the code goes in an email, click the link in the email and check that it applies. If it goes on a poster, type it from memory on a phone. If it goes to a creator, ask them to test it before they post.
How should you name and share discount codes?
Name a code for the shopper who has to type it, not for your own filing system. Short, plain, and tied to the offer: FALL20, WELCOME10, FREESHIP. Avoid special characters and codes that look like another word when typed quickly. One code can name up to 100 specific customers, products, and variants, so keep the lists short.
Share the code where the shopper meets the offer. A welcome code goes in the email that follows signup. A sale code goes on the homepage banner and in the cart reminder email. A creator code goes only to that creator, with their name in it, so you can track their sales. Running one offer in two places? Give each channel its own code: open the first discount, click Duplicate, change only the code, and click Save.
Do not run a code forever. A code with no end date trains buyers to wait for it, and it makes every full-price sale feel like a mistake. Give each code a start and an end, tell shoppers the end date, and let it expire. For the emails that carry these codes, read our guide to the best Shopify apps for email marketing and set up the welcome flow first.
| Discount type | What it does | Best for | Watch out for |
|---|---|---|---|
| Amount off products | Percentage or fixed amount off chosen products | Category sales, clearing stock | Only covered products count toward the minimum |
| Amount off order | Percentage or fixed amount off the whole cart | Store-wide sales, first orders | Does not cover shipping |
| Buy X get Y | Free or cheaper item when shoppers buy others | Bundles, raising order size | Shopper must add the free item to the cart |
| Free shipping | Removes the shipping charge | High carts, new buyer offers | Country limits and rate caps apply |
| Automatic discount | Applies itself when the cart qualifies | Store-wide sales, no code to type | Limit of 25 active at once |
Use the table to pick the type before you open the form. Shopify will not change it after you save.
Frequently asked questions
How do I create a discount code on Shopify?
In your Shopify admin, go to Discounts and click Create discount. Pick a type, choose Discount code as the method, then type a code or click Generate random code. Set the value, minimum, eligibility, uses, combinations, and dates. Click Save, then test it with a cart that qualifies.
Can I edit a Shopify discount code after I save it?
Yes, except its type. Shopify will not turn a saved code from Amount off products into Free shipping, so create a new discount of the type you want. Everything else, from the value to the end date, stays editable. Renaming a code never resets its use count.
Why does my Shopify discount code say it is not valid?
Usually one of five settings is wrong: the eligibility list, the minimum purchase, the schedule, the one-use-per-customer limit, or the combinations rule. Check the exact message at checkout, fix the matching setting, and test again with a cart that qualifies. Shopify never names the setting in the message.
How many discount codes can I create on Shopify?
Shopify limits you to 25 active automatic discounts at any time. Discount codes do not share that cap, and you can create up to 3,000 unique codes per batch for campaigns that need one code per shopper. Keep the active list short so you can tell which offers are running.
Should I use a discount code or an automatic discount?
Use a code when the shopper carries the offer to the store, such as an email, a creator post, or a poster, because each channel gets its own trackable code. Use an automatic discount for a store-wide sale, where every qualifying cart gets the deal with no typing.
How to create a discount code on Shopify is a ten-minute job once you know the form, and the job that matters is the testing after it. Pick the type first, fill the form top to bottom, test the code with a real cart, and only then send it out. A code that works the first time a buyer tries it is worth more than a bigger discount that fails at checkout. Sources: Shopify Help Center discount documentation, checked in the admin in November 2026.