Skip to content
Hand-E Solutions, to the home page

Tips for your store

How to create a discount code in Shopify, step by step

A discount code is quick to set up in the Shopify admin. The mistakes hide in the settings below it: no end date, no limit per customer, a combination you didn't want. And once you save, you can't change the discount type.

By Max Handrik · Updated October 15, 2026 · 5 min read

Six tiles under the line Goal first, then the discount type: higher order value with tiers by cart value, more units with volume discount, add-ons with bundle, threshold without a price cut with free gift, new customers and partners with unique codes, shipping costs with a free shipping threshold

1 Discount code or automatic discount?

Shopify has two methods. A discount code is entered by the customer at checkout. An automatic discount applies on its own as soon as the cart meets the conditions. According to Shopify, codes suit targeted campaigns such as emails or partnerships, and automatic discounts suit store-wide sales. One downside, according to Shopify: forgotten codes can lead to abandoned carts.

You can have at most 25 active automatic discounts, app discounts included. Which discount type fits which goal is covered in our guide to choosing a discount type.

2 Create the code in the admin

Decide on the discount type first: according to Shopify, the type and method can't be changed after saving, so the only fix is to delete the discount and create it again. Here's how to create a code for a percentage or a fixed amount:

  1. In your Shopify admin, go to “Discounts” and click “Create discount.”
  2. From the “Select discount type” menu, pick “Amount off products” or “Amount off orders.” The other options are “Buy X get Y” and “Free shipping.”
  3. Under “Method,” select “Discount code.”
  4. Enter a name for the code, such as SUMMER10, or click “Generate code.”
  5. Under “Value,” select “Percentage” or “Fixed amount” and enter the value.
  6. For a product discount, select “Specific products” or “Specific collections” under “Applies to” and add them.
  7. Set limits and dates as described in the next section, then click “Save.”

3 Set the limits before you save

Below the value are the settings that decide what the code costs you. If you leave the usage limits and the end date empty, the code can be redeemed any number of times and never expires.

SectionWhat you setWhat to watch for
Minimum requirementsMinimum purchase amount or minimum quantity of itemsThe amount counts product prices only, without shipping and taxes
EligibilityAll customers, specific customers, customer segments or marketsAccording to Shopify, a segment only covers customers with a profile, not first-time buyers
Maximum discount usesLimit the total number of uses, or limit to one per customerShopify recognizes the customer by email address or phone number
CombinationsWhich discount classes the code can combine withBoth discounts have to allow the combination
Active datesStart date and, via “Set end date,” the endTimes follow the time zone set in your admin

4 Share the code as a link

So nobody has to type the code, Shopify creates a shareable link: open the discount, click “Promote” and select “Get a shareable discount code.” Anyone who opens the link gets the discount applied to their cart automatically. You also get a QR code for receipts, displays or scanning at your shop counter.

The link ends in /discount/ and your code. If it shouldn't open your home page, add a redirect, such as /discount/SUMMER10?redirect=/collections/sale. It only works while the discount is active. Avoid special characters in the code so it comes through cleanly in the URL.

5 Mistakes that make a code expensive

Check these points before you save. If a code still doesn't apply, see our troubleshooting guide for discounts that don't work.

  • No end date: the code never expires, even long after the promotion is over.
  • Only “once per customer”: anyone entering a new email address can use the code again.
  • Wrong discount type: you can't change it. Delete the discount and create it again.
  • A value of zero: according to Shopify, discounts of $0 or 0% might not work at checkout. Use at least 1% or $0.01.
  • More than 100 products: a code can apply to at most 100 specific customers, products and variants. For more, use a collection.
  • Forgotten combinations: without the checkbox, the code doesn't apply alongside other discounts. Shopify then applies the better discount for the customer.

6 Many codes, or codes in one sentence

The admin creates one code at a time. If you want to give every customer their own code, for example in a newsletter or on printed cards, hundreds of codes call for an app or the developer API. Both routes are covered in our guide to unique bulk discount codes.

Shopify's own assistant, Sidekick, can create discounts according to the help center and fills in the admin form for you. You check the fields and save yourself.

Common questions

How do I create a discount code on Shopify?
In your Shopify admin, go to Discounts > Create discount. Pick the discount type, choose “Discount code” as the method, enter a code or generate one, set the value, limits and dates, and click “Save.”
Can I change the discount type after saving?
No. According to Shopify, the discount type and method can't be changed after the discount is created. Delete it and create it again. All other settings can be edited.
Is a gift card code the same as a discount code?
No. A discount code lowers the price. A gift card is a payment method and is applied to the order total after discounts are calculated. More in our guide to gift cards in Shopify.
How do I share a discount code as a link?
Open the discount in your admin, click “Promote” and select “Get a shareable discount code.” Shopify gives you a link and a QR code. Anyone who opens the link gets the discount in their cart automatically, as long as the discount is active.