Last week people in the search industry spotted ChatGPT and Google’s AI Overviews showing shoppers discount codes right in their answers, in some cases on a little card with a copy button, using codes pulled from coupon sites, forum threads and affiliate pages. If you run a Shopify store, the question worth asking before Black Friday is which of your Shopify discount codes it’s going to find.

In most stores I look at, there’s a code from a sale two years ago that never got an end date, an influencer code from a campaign that wrapped up months ago and at least one 100% off code somebody made to test checkout. Below is why that’s now more of a security problem than a marketing one, and how to clean it up in about 20 minutes.

Why an old code is now a security problem

A discount code is a key to your margin. Once a code has been posted anywhere public (a coupon site, a Reddit thread, a screenshot of an email someone forwarded), it keeps working for anyone who finds it until you switch it off. Stripe files it under risk management, and its guide to promo abuse describes codes posted to coupon aggregators being “redeemed far beyond their intended audience”, and attackers combining leaked codes “to push a transaction towards zero cost”.

AI isn’t hacking your store, but it’s reading every one of those places at once and handing what it finds to anyone who asks, which is a lot more people than ever went digging through coupon sites. In this national retail survey, one in four Australians planning to shop the Black Friday sales said they’ll use an AI chatbot to research products and find deals, and 72% of them said it’ll be their first time using one for Black Friday.

The codes it finds are rarely the ones you’d choose. One audit of 117 million Shopify discounts, run by a company that sells discount software, found 90% had no expiry date set and were 2.5 years old on average. That’s their data, from their own customers, but it matches what I see. A code with no end date and no limit on how many times it can be used is the one most likely to be sitting on a coupon site right now.

Illustrative diagram. A discount code called NEWSLETTER20, sent to subscribers in 2024, spreads to a coupon site, a forum thread and a forwarded email, then appears in an AI answer with a copy button, shown to any shopper who asks for a code. It is still live because it never got an end date.

The 20-minute Shopify discount code cleanup

Everything below is in your Shopify admin, and none of it needs an app. Do it before the Black Friday sales start on 27 November and again before Boxing Day.

Find the old codes that never ended

Filter your discounts to active ones and add a start date filter to show anything that started more than a few months ago. Open each one and check the end date. If a code was made for a campaign that’s finished (last year’s Black Friday, a launch, a podcast shout-out, a single influencer) and it has no end date, it’s still live for everyone who has it.

Switch off anything free or stackable

Look for anything set to 100% off, or free shipping with no maximum. Those are the codes that can turn a leaked string into free orders. Then use the “Combines with” filter to see which codes can be stacked with others. If your combination settings allow it, Shopify lets a customer use up to five discount codes on one order, so two harmless-looking 20% codes that combine can do a lot more damage together than either one would on its own.

Check which old codes are still being used

Shopify’s Sales by discount report shows how often each code is used. If a code is still being redeemed weeks after the campaign it was made for ended, it has escaped the channel you gave it to. That’s often a coupon site or a browser extension, and it’s the first one to switch off.

Deactivate, don’t delete, and never reactivate

Deactivating a code stops it working straight away, and a customer who tries it gets Shopify’s standard “Unable to find a valid discount matching the code entered” message. I’d deactivate rather than delete, because Shopify notes that if you delete a one-per-customer code and recreate it, everyone who used the old one gets another go. The trap to avoid is reactivating an old code to keep a customer happy, because Shopify brings a reactivated expired discount back with no end date at all. Make a fresh code with its own end date instead.

Checklist. Before Black Friday, switch off any code that has finished its campaign but has no end date, is 100% off or free shipping with no cap, stacks with other codes when you didn't mean it to, or is still being used after its campaign ended. Never reactivate an old code, because Shopify brings it back with no end date.

Pick the one code you’re happy for anyone to find

You can’t stop AI tools finding codes, so I’d give them the right one to find. Pick the code you’re happy for the whole internet to have this Black Friday and put it on a page on your own site, with the discount, the dates and any exclusions in plain text. If you run Shopping ads, you can usually add the same code and dates as a promotion in Google Merchant Center so Google gets it from you directly (we check what’s available for your store first), which our Google Shopping team can set up.

Every other code should have a job and a limit. Name it for where it went (NEWSLETTER20 rather than SAVE20), so you can tell where a leak started, and give it an end date and a maximum number of uses. For welcome and win-back emails, use single-use codes generated for each customer, which most email platforms can do for you. Our email marketing team sets those flows up so a code sent to one person can only be used once.

If you’d like to leave an intentional easter egg code out there for the people who go looking, go for it. Give it a cap, an end date and a discount you’d be happy to hand the whole internet, because that’s who’ll end up with it.

Two panels with illustrative codes. Public on purpose: BLACKFRIDAY26, on a page on your own site with dates and exclusions in plain text, ending 30 November, fine for AI to find. Everything else has a job and a limit: NEWSLETTER20 with 500 uses max ending 31 December, SARAH15 for one influencer ending with her campaign, a single-use welcome code for each new subscriber, and SECRETMENU10 as an easter egg that is capped and dated. These stop working once their job is done.

Who needs to do this before Friday

If you run one sitewide sale code a year, this is a ten-minute job. If you’ve run influencer codes, affiliate codes, staff codes or a few years of Black Friday sales, you’ve got more out there than you think, and it’s worth doing this week rather than after you notice a margin dip in December.

It’s also worth tidying for a reason that has nothing to do with AI. The ACCC’s Black Friday sweep this year looks at websites, emails and social media for the first time, so make sure what your promotions say matches what your codes do. That’s general information, not legal advice, so check anything specific with your adviser.

We wrote earlier this year about why a sale that never ends is just your price, and an old code nobody turned off is how that happens without anyone deciding it. If you’d like a hand cleaning up your store’s discounts before the sales, or building a Shopify store that keeps them tidy, our ecommerce team can help, so let’s talk.

Frequently asked questions

Can I stop ChatGPT showing my discount codes?

Not directly. AI tools show whatever codes they can find on public pages, so the practical fix is making sure old codes have been switched off and your current code is easy to find on your own site. Checking what AI tools say about your business more broadly is worth doing too, and we’ve written up how to check what AI is saying about your business.

Do I have to honour a code a customer found through AI?

That depends on the code and what was promised, so it’s one to check with your adviser rather than take from a blog. In practice, it’s worth deciding in advance what your customer service team will say when someone turns up with an old code, so they’re not working it out at the checkout on Black Friday.

How this post was made
  • Where it started: reports of AI tools showing discount codes in their answers, plus a handful of ecommerce podcasts on discount code habits. We used AI to pull the transcripts and summarise the sources.
  • What a person did: the angle is mine. Old codes are the risk, and the fix is a cleanup plus one public code you choose on purpose. The first draft was written with AI from my notes, then I edited it and made the final call on what stayed in.
  • How the facts were checked: against Shopify’s own help pages on managing discounts, Stripe’s guide to promo abuse, the published audit and survey linked above, and the reports of AI coupon codes.
  • Written and signed off by: Jack Headford.
Jack Headford

Account Manager & Operations Lead