You are currently viewing How to Create Shopify Discount Codes: Step-by-Step Guide for 2026

How to Create Shopify Discount Codes: Step-by-Step Guide for 2026

  • Post author:
  • Post last modified:10/08/2026
  • Post category:How-To

Shopify discount codes are one of the most direct tools for converting hesitant shoppers, recovering abandoned carts, rewarding loyal customers, and running promotions without reducing your listed prices permanently. Used with discipline, they lift conversion rate and revenue. Used without a system, they train customers to wait for deals and gradually erode your margins. This guide covers every type of Shopify discount code, how to create each one in the admin, how to control usage, and how to deliver codes to customers at the right moment, including via AI chat, where most competitors have no guidance at all.

The four types of Shopify discount codes

Shopify supports four distinct discount code types, each suited to a different commercial goal. Understanding which to use before building a campaign prevents you from applying the wrong mechanic to the wrong situation.

Percentage off
%
10%, 20%, 30% off a product, collection, or entire order
Best for: first orders, flash sales, winbacks
Fixed amount off
£
£5, £10, £20 off products or a minimum spend threshold
Best for: basket growth incentives
Free shipping
Waives the delivery charge; optional minimum order value
Best for: cart abandonment recovery
Buy X Get Y
B1G1
Buy 2, get 1 free. Buy product A, get product B at a discount
Best for: clearance, cross-sell, bundles

Discount codes vs automatic discounts: which to use

Shopify also supports automatic discounts, which apply without a code at checkout. The distinction matters for how you position the offer.

Use a discount code when: you want the customer to feel they have found or earned something (a code from an email, a reward for loyalty, a code shared by an influencer). Codes also limit access to the promotion, since only customers who have the code can use it.

Use an automatic discount when: you want the discount applied for everyone without friction (a sitewide sale, a free shipping promotion for all orders, a launch offer). Automatic discounts remove the awkward “where do I enter the code?” moment at checkout, which reduces abandonment for price-sensitive buyers.

Shopify allows both a discount code and an automatic discount to apply to the same order, depending on your combination settings. If you are running an automatic sale and also want to offer a personalised email code, check your discount combination rules before both go live to avoid stacking you did not intend.

How to create a discount code in Shopify admin: step by step

1
Discounts
→ Create discount

2
Choose discount
type

3
Set code or
auto-generate

4
Set value and
applies-to scope

5
Min. purchase
requirement

6
Usage limits
and eligibility

7
Set active
dates and save

8
Distribute
to customers

  1. Go to Discounts in your Shopify admin (left sidebar) and click “Create discount,” then select “Discount code.”
  2. Choose the discount type: Percentage, Fixed amount, Free shipping, or Buy X Get Y.
  3. Set the code: Type a memorable code (SUMMER20, WELCOME10) or click “Generate” for a random string. If you need hundreds of unique single-use codes, use the “Bulk generate” option under the discount code list view.
  4. Set the value: Enter the percentage or fixed amount. For percentage discounts, ensure the value makes commercial sense relative to your gross margin on the products it applies to.
  5. Choose what the discount applies to: Entire order, specific collections, or specific products. Applying to specific products gives you the most control over margin impact. Sitewide discounts are rarely the right default.
  6. Set minimum purchase requirements: A minimum order value (£40 minimum for free shipping) or a minimum quantity (buy 2 to get the discount). This protects margin on small orders and drives basket growth.
  7. Set usage limits: Total number of uses across all customers, and/or a per-customer limit. For any code you are emailing to a list, set the per-customer limit to 1 to prevent a single customer using it repeatedly and to limit forward-sharing.
  8. Set customer eligibility: All customers, specific customer segments, or specific customers by email. Shopify’s customer segments (based on purchase history, tags, or location) allow you to restrict a code to your loyalty tier or to first-time buyers only.
  9. Set start and end dates: Always set an expiry. Codes without expiry dates get forwarded, shared on discount code websites, and used years later on products you may no longer want to discount. A 14 to 30 day window is appropriate for most campaign codes.
  10. Save and distribute.

Setting usage limits and minimum thresholds that protect margin

The most commonly misconfigured aspects of Shopify discount codes are usage limits and minimum thresholds. Codes without both are open to misuse in ways that are difficult to reverse once a code is in circulation.

Total usage limit: If you are running a flash sale with limited stock, set a total usage cap that matches your stock availability. A code for “20% off our bestseller” without a usage cap can deplete inventory faster than you expect if the code spreads on social media.

Per-customer limit: Set to 1 for any campaign code that is personalised or intended as a one-time incentive. Without this, customers can use the same code across multiple orders, and your most deal-sensitive buyers will do exactly that.

Minimum order value: This is one of the most powerful levers in the discount setup. A £10 off code with a £50 minimum prevents it from being used on low-value orders where the margin cannot absorb the discount. It also naturally increases average order value for customers who are just below the threshold.

Discount combination rules in Shopify

Shopify allows you to specify whether a discount code can combine with other discounts. The three combination categories are:

  • Product discounts: Can your code combine with another product-level discount?
  • Order discounts: Can your code combine with an order-level automatic discount?
  • Shipping discounts: Can your code combine with a free shipping promotion?

By default, most discounts do not combine. For standard campaigns, leave combinations off. The main exception is free shipping: allowing a percentage discount code to stack with a free shipping promotion is often intentional and frequently expected by customers during peak sale periods. If you are running Black Friday offers with multiple discount types active simultaneously, map out your combination rules in advance to avoid customers combining a 30% code with a free shipping automatic discount in ways you did not plan for.

How to distribute Shopify discount codes effectively

Creating the code is only half the job. How you distribute it determines who uses it, when, and whether it reaches customers in a moment when they are ready to buy.

Email sequences

Email is the default channel for discount code delivery and works well for welcome sequences, post-purchase follow-ups, and re-engagement campaigns. The key is timing: a welcome discount code should arrive within minutes of sign-up, not 24 hours later when the browsing session has ended. Personalised codes (unique per recipient, generated in bulk) prevent forward-sharing and give you accurate per-customer redemption data.

AI chatbot delivery

An AI chatbot that can detect cart abandonment signals in real time can deliver a discount code at exactly the right moment: when a customer has been on the checkout page for more than 90 seconds without completing, or has visited the same product page three times without adding to cart. This approach avoids the “blast to everyone” logic of a popup and delivers the code only to customers who need the nudge, protecting margin on customers who would have bought at full price. AeroChat’s Shopify customer service automation connects cart signals to code delivery without requiring a manual workflow setup for each campaign.

WhatsApp and SMS campaigns

WhatsApp message open rates significantly exceed email, which makes it an effective channel for time-sensitive codes (flash sale, 48-hour offer). Codes delivered via WhatsApp benefit from the channel’s urgency: a notification that arrives on someone’s phone with a limited-time offer is harder to ignore than an email in an inbox with 400 unread messages. Combine WhatsApp delivery with a clearly ticking expiry window for best results.

Influencer and affiliate codes

Unique codes per influencer or affiliate (SARAHSTYLE15, PARTNER20) allow you to track exactly which partnership is driving revenue without needing UTM parameters or post-purchase attribution surveys. Create these as individual codes in bulk or use Shopify’s built-in affiliate tracking. Set a per-customer limit of 1 if you do not want a single follower to use the influencer code on multiple orders.

Post-purchase winback

Customers who have not purchased in 60 to 90 days are a high-value recovery target. A Shopify winback campaign combining a personalised discount code with a WhatsApp or email message is typically the most effective reactivation approach. For back-in-stock situations, pairing a restock notification with a limited-time discount for customers who enquired about the product creates genuine urgency rather than manufactured scarcity.

Common discount code mistakes to avoid

No expiry date: Codes without an end date get shared publicly and used indefinitely. Set a 14 to 30 day expiry on every campaign code.

Sitewide codes in public places: Publishing a working discount code in a social media bio, a YouTube video description, or a publicly accessible blog post makes it available to anyone. Once a code circulates on bargain-hunting websites, you lose control over who uses it and when. For public channels, use automatic discounts instead, which apply to everyone without the friction of a code and cannot be independently “leaked.”

No minimum threshold: A 20% off code with no minimum can be used on a £10 product, generating only £8 revenue against your cost base. Always ask whether the discount is sustainable at your lowest-priced products, not just your average order value.

Too many concurrent active codes: Having multiple discount codes active simultaneously (a welcome code, a seasonal code, an influencer code, and a loyalty code) creates a situation where technically sophisticated customers can test different codes to find the largest discount. Review your active code list monthly and retire any code that is no longer actively being promoted.

How AeroChat delivers discount codes precisely when customers need them

Creating a discount code in Shopify takes a few minutes. Deciding exactly when to show it, and to whom, is the part that determines whether it grows revenue or simply erodes margin. AeroChat is an AI chatbot for Shopify that delivers discount codes conversationally: responding to “do you have any discount codes?” in chat, recognising when a customer has spent time on the checkout page without completing, and sending a targeted recovery message to someone who abandoned a cart earlier that day.

Because AeroChat delivers codes in response to a specific signal rather than broadcasting them to every visitor, you reduce the number of discounted transactions without reducing the recovery rate. Customers who were going to buy anyway continue to do so at full price. Customers who needed a nudge get one. The discount is used where it earns its cost rather than where it simply reduces your revenue.

AeroChat plans start from $49 per month with a 7-day trial. Configure your first shopify chatbot discount flow during the trial and compare your cart recovery rate against the previous period.

Frequently asked questions

How do I create bulk unique discount codes in Shopify?

In the Shopify admin, go to Discounts, click “Create discount,” choose “Discount code,” and set up your discount parameters. Before saving, look for the “Generate codes” option, which allows you to create multiple unique codes at once with a shared prefix (WINTER_ + random string). For large volumes (1,000 or more unique codes), some merchants use Shopify’s bulk import via CSV or a third-party app like Bulk Discount Code Bot.

Can Shopify discount codes expire automatically?

Yes. In the discount creation screen, set an end date and time under “Active dates.” Once the end date passes, the code becomes inactive automatically and customers will receive an error message at checkout if they attempt to use it.

How do I stop customers sharing my discount code?

Set the per-customer limit to 1 and, for email campaigns, generate a unique code per recipient rather than using a single shared code across the campaign. Unique codes cannot be reused by someone else, and they allow you to see exactly which customer redeemed which code in your discount analytics.

What is the difference between a discount code and an automatic discount?

A discount code requires the customer to enter a code at checkout. An automatic discount applies without any action from the customer. Discount codes are better for targeted campaigns with limited access; automatic discounts are better for sitewide promotions where you want zero checkout friction.

Can I apply a discount to a specific customer segment in Shopify?

Yes. In the discount creation settings, under “Customer eligibility,” select “Specific customer segments.” Shopify’s segment builder lets you target by purchase history (first-time buyers, VIP spenders, lapsed customers), location, email subscription status, and custom tags you have applied to customer accounts. This is the most precise and margin-safe way to distribute a discount, as it reaches only the customers for whom the offer makes commercial sense.

How can an AI chatbot help deliver discount codes?

An AI chatbot can be configured to deliver a discount code in response to specific customer behaviours: long time on checkout, expressed hesitation in chat (“is this worth the price?”), returning visits to the same product page, or direct request (“do you have any discount codes?”). This is more precise than showing a discount popup to every visitor, because it targets only customers who are genuinely on the fence. AeroChat’s Shopify customer service automation includes this kind of intent-based discount delivery as part of its chat flow configuration.