Last updated: August 2026

To auto apply a discount code on Shopify, create a code in Shopify admin → Discounts, then share its discount link in the format `https://yourstore.com/discount/CODE?redirect=/checkout`. When a shopper clicks it, Shopify carries the code into checkout automatically. If the same offer should apply to every qualifying cart, create an automatic discount instead; it uses no code or special link.

Both options are native Shopify features and work without AutoCart. This guide shows the exact setup steps, prerequisites, limitations, and tests for each method. It also explains how AutoCart fits when the promotion must add a gift or other product—not just change a price.

Two ways Shopify can apply a discount without the customer typing anything

Shopify's discount engine has two "methods" for any discount: code (the customer enters something) and automatic (they don't). What confuses merchants is that a code-based discount can also skip manual typing — if you send the customer a specific link instead of the code itself. That gives you two distinct auto-apply options:

  1. A discount URL — still a real code under the hood, but it pre-fills at checkout when the customer clicks a link you generate.
  2. An automatic discount — no code exists at all; it applies to any cart that meets your conditions.

They solve overlapping but different problems. Here's how to set up each.

Before you auto apply a Shopify discount

You need permission to create discounts in Shopify admin, an active discount with valid dates and eligibility rules, and a storefront domain you can use in the discount link. Decide first whether the offer is campaign-specific or available to every qualifying shopper: use a discount URL for a campaign-specific code, and an automatic discount for a broad offer.

Neither method can add a product to the cart. Discount links also depend on the shopper entering through the link, while automatic discounts depend on the cart meeting the conditions you configure. Before launch, test the offer in a private browser with a qualifying cart, a non-qualifying cart, and any other discounts you expect customers to combine.

Method 1: Auto-apply via a discount URL (link-dependent)

Use this when you want a trackable, campaign-specific code — an email blast, an influencer's unique link, a retargeting ad — that still applies itself.

  1. In Shopify admin, go to Discounts and create a new discount as usual, with Discount code as the method (e.g., `SUMMER15`).
  2. Set your conditions, value, and dates, then save.
  3. Build the auto-apply link: `https://yourstore.com/discount/SUMMER15?redirect=/checkout` (swap `/checkout` for `/cart` or a collection URL depending on where you want the customer to land).
  4. Use that link — not the raw code — anywhere you'd normally print `SUMMER15`: email buttons, SMS, ad landing pages, influencer bios.
  5. Test it in a private/incognito browser window and confirm the code shows as applied in the checkout discount field before you send it live.

Where it breaks: the auto-apply only happens if the customer arrives via that exact link. If they screenshot the code, forward the email text instead of clicking the button, bookmark checkout and return later, or find the code posted on a coupon site, they're back to typing it manually — and a visible, empty discount field at checkout is exactly what sends price-sensitive shoppers hunting for a better one in another tab. That field-abandonment risk is one reason some merchants skip discount codes for cart recovery entirely and auto-add a gift instead — see our guide to automating a free gift with a promo code for when that trade works better than a deeper discount.

Method 2: Skip the code entirely with an automatic discount

Use this when the offer should apply to everyone who qualifies, with zero customer action — a sitewide sale, a cart-value threshold, a first-order incentive.

  1. In Shopify admin, go to DiscountsCreate discount.
  2. Choose your discount type (percentage off, fixed amount, free shipping, or Buy X Get Y).
  3. Under Method, select Automatic discount instead of Discount code — this is the field merchants most often miss, since it defaults to code.
  4. Set your conditions (minimum purchase amount, specific products or collections, customer eligibility) and the discount value.
  5. Save. From that point on, any qualifying cart gets the discount applied at checkout automatically — no code, no link, no field for the customer to notice or ignore.

Where it breaks: an automatic discount applies to anyone who meets the condition, which means you lose the ability to target it at a specific campaign or segment the way a trackable link lets you. Shopify now lets customers enter multiple discount codes on one order — up to five product or order codes plus one shipping code — but they only actually stack if each discount's combination settings allow it; by default, discounts don't combine. So if you're running several promotions at once, check your combination rules before assuming they'll all apply together.

The gap neither method closes: discounts don't add products

Both auto-apply methods change price. Neither can add a product to the cart. That's true even for Shopify's Buy X Get Y automatic discount — it can make a second item free once it's in the cart, but it won't put that item there. The customer still has to find the free product and add it themselves before the discount has anything to apply to.

This matters most for compound promotions: "15% off, plus a free sample" or "auto-apply BUNDLE10 and the matching travel case is $1." The price half can run itself with an automatic discount. The product half still needs a manual add — which quietly reintroduces the exact friction you removed by getting rid of the code field.

Where a rule-based app fits — and where it doesn't

To be clear about scope: AutoCart doesn't apply discount codes and doesn't touch checkout-line pricing. Automatic discounts already handle the "no code to type" part natively, for free — there's no reason to add an app just to replicate that. What AutoCart does is the other half: auto-adding a product to the cart based on the same kind of condition (cart value, specific product, customer tag) that drives an automatic discount, so a bonus item shows up without the customer hunting for it and adding it manually. If that is the workflow you need, review AutoCart's automatic product-add features after you finish configuring the Shopify discount.

Paired together, a compound offer stops needing any manual step on either side: set a 15%-off automatic discount at a $75 cart threshold, and set an AutoCart rule that auto-adds the free sample at the same $75 threshold. The customer crosses $75, the price drops, and the sample appears in the cart — no code, no link, no separate product hunt.

Discount URL vs. automatic discount vs. auto-add: which handles what

Discount URL Automatic discount AutoCart (product auto-add)
Customer types a code No, if they click the link Never N/A — doesn't touch codes
Requires a specific link to trigger Yes No No
Still works if the code is shared as plain text No Yes (no code exists) N/A
Can be limited to a specific campaign or segment Yes Not by link — use customer eligibility rules Yes, via cart/customer conditions
Can add a bonus product to the cart No No Yes
Requires Shopify Plus No No No
Requires a developer No No No

Use a discount URL when you need to track a specific campaign. Use an automatic discount when you want zero friction for every qualifying customer. Add a rule-based auto-add on top when the offer includes a product, not just a price cut.

Common mistakes when trying to auto-apply a Shopify discount

  • Sharing the raw code instead of the discount URL. The moment a customer sees `SUMMER15` as plain text instead of a link, you're back to manual entry — and manual entry is the friction you were trying to remove.
  • Forgetting to switch the discount's Method to "Automatic." It's easy to build a great automatic-discount offer and leave the method set to "Discount code" by default, which means it never applies without one.
  • Assuming an automatic discount can be scoped to "whoever clicked this link." It can't — automatic discounts key off cart and customer conditions, not traffic source. If exclusivity or attribution matters, use a discount URL instead.
  • Expecting the "get" side of a Buy X Get Y discount to add itself. It won't — same limitation covered in our gift with purchase guide. The discount is ready the moment the product is in the cart; getting it there is a separate problem.
  • Running an automatic discount and a code discount that silently conflict. Check your combination settings — by default, some discount types won't stack, and a customer applying a second code can knock out the automatic one without any error message.

Auto-apply discount codes on Shopify: frequently asked questions

Can Shopify auto-apply a discount code at checkout? Yes, two native ways: a discount URL that pre-fills a real code when a customer clicks a specific link, or an automatic discount that has no code at all and applies to every qualifying cart. Neither requires an app.

Why isn't my Shopify discount code applying automatically? The two most common causes are sharing the plain code instead of the discount URL (so there's no link to trigger the auto-fill), or leaving the discount's Method set to "Discount code" when you meant to create an "Automatic discount."

What's the difference between a discount URL and an automatic discount? A discount URL still uses a real code — it just auto-fills at checkout when the customer clicks a link you generate, so it only works for that specific path. An automatic discount has no code; it applies to any cart meeting the conditions, however the customer arrived.

Can a Shopify discount automatically add a free product to the cart? No. Native discounts, code-based or automatic, only change price — they can make a product free once it's already in the cart, but they won't add it there. For offers that combine a discount with a bonus product, you need a rule-based app to handle the auto-add half; see our BOGO setup guide for the same mechanic applied to buy-one-get-one offers.

Do I need Shopify Plus to auto-apply discounts? No. Discount URLs and automatic discounts are both available on every Shopify plan. You'd only need Shopify Plus if you were building fully custom discount logic with Shopify Functions.

Make the whole offer automatic, not just the code

If the goal is the fewest possible steps between your offer and the sale, an automatic discount is the strongest default for anything that should apply broadly — no code, no link dependency, no field for the customer to notice or ignore. Save trackable discount URLs for campaigns where attribution matters more than universal reach.

And if the promotion is more than a price cut — a discount plus a free gift, a bundle, a threshold reward — remember that Shopify's discount engine stops at price. AutoCart handles the product side with the same kind of rule, so the bonus item shows up the moment the cart qualifies, no manual add required. It's the same auto-add engine behind our gift with purchase and BOGO guides, and it pairs naturally with whichever discount method you're already running. If you're weighing a discount code against a free gift for AOV specifically, see our Shopify AOV tactics guide — the two tactics move average order value in opposite directions.

Try AutoCart free on your Shopify store: apps.shopify.com/autocart-auto-add-to-cart