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

Guide

Generate unique discount codes in Shopify, hundreds at once

One Shopify discount can carry many codes, and a store can have up to 20 million unique codes. Hand-E AI Discounts generates up to 1,000 codes per campaign on every plan, with your own prefix. It creates them as one Shopify discount and gives you a CSV file.

By Max Handrik · Updated October 15, 2026

One code for everyone gets passed around

A shared code like NEWSLETTER10 is quick to set up. With the limit to one use per customer, every email address or phone number can redeem it once. But if the code ends up on a coupon site, anyone who enters a new address can use it.

Unique codes solve this: every recipient gets their own code that can be redeemed once. For printed coupon cards at a trade show, an influencer campaign with its own prefix or a welcome series in your newsletter, you quickly need several hundred of them.

Shopify is built for this: one discount can carry many codes that share active dates, value and conditions. The open questions are practical. How do you create the codes? Are they easy to read? And how do they get into your email marketing tool or to the print shop?

FeatureShopify aloneWith Hand-E AI Discounts
Many codes on one discountthrough Shopify's interface for programmers (Admin API), up to 250 codes per requestup to 1,000 per campaign, on every plan
Prefixfree, if you generate the codes yourselfyour own prefix per campaign
Easily confused charactersdepends on who generates the codesno 0 and O, no 1, I and L in the random part
CSV fileput it together yourselfdownload with the codes actually created
Coding requiredyes, for the developer routeno

What works without an app

For one code or a few, the Shopify admin is enough. For several hundred, you need a developer or an app.

  • Discount form in the admin: You type in a code or generate a random one with a button. Then you set active dates, minimum purchase requirements, maximum discount uses and combinations.
  • One shared code limited per customer: fine if it doesn't matter that the code gets around, for example as a thank-you to all subscribers.
  • Admin API, for developers: Shopify's interface for programmers can add up to 250 codes to a discount per request. The codes are created in the background, not instantly. For 1,000 codes that's at least four requests, plus a check of which codes were actually created. You need a developer for this route.
  • Upper limit: According to the help center, a store can have 20,000,000 unique discount codes in total. Once the limit is reached, you have to delete existing codes.
  • Shopify Forms: The app can attach a discount to a signup form for email, SMS or WhatsApp marketing.
  • Apps in the Shopify App Store: There are several code generators. Compare prefix, character set, codes per run and whether the CSV file contains nothing but real codes.

How to generate a code campaign in Hand-E AI Discounts

A campaign is one Shopify discount with many codes. You set up the discount once, and the app generates the codes for it.

  1. Choose the Bulk codes discount type.
  2. Set prefix and number of codes, for example ANNA with 120 codes. Every plan allows up to 1,000 codes per campaign.
  3. Set up the discount: percentage or fixed amount, on the entire order or on a selection.
  4. Decide on Each customer can redeem only one code and Each code can be redeemed only once. For personal codes and coupon cards, both make sense.
  5. Generate the codes and download the CSV file. It contains the codes Shopify actually created, nothing else.
  6. Import the file into your email marketing tool or send it to the print shop for the coupon cards.

Worked through: three campaigns for one fall season

Three promotions, three campaigns, each with its own prefix. Because each campaign is its own Shopify discount, Shopify's Sales by discount report keeps the promotions apart.

CampaignPrefixCodesDiscount
Newsletter welcomeHELLO18010% off the order
Influencer AnnaANNA12015% off the order
Trade show coupon cardsEXPO750$5 off the order

Limits and pitfalls

  • At most 1,000 codes per campaign, on every plan. For 2,400 coupon cards you create three campaigns, each its own discount.
  • Without Each code can be redeemed only once, a code can be used several times. For coupon cards you usually don't want that.
  • According to Shopify, customers can use at most five product or order discount codes and one shipping discount code per order. Whether your code applies alongside other discounts is set on the Combinations card.
  • Avoid special characters in the prefix. Shopify advises against them so that links with a discount code work properly in checkout.
  • The codes remain after you uninstall the app. They're regular Shopify discounts that you end in the admin when the promotion is over. That's also why they don't pause if your store outgrows its plan.
  • Keep the CSV file to the people who need it. Whoever has the list has every code.

Common questions

Can one Shopify discount have multiple codes?
Yes. One discount can carry many unique codes that share value, active dates and conditions. Hand-E AI Discounts creates every campaign exactly that way: one discount, many codes.
Which characters appear in the random part of the bulk codes?
Letters and digits without easily confused characters: no 0 and no O, no 1 and no I or L. That helps when customers type a code from a printed card.
Why does the CSV file contain fewer codes than I requested?
The file contains the codes Shopify actually created, nothing else. That way you never send or print a code that doesn't work at checkout.
How many discount codes can a Shopify store have in total?
According to Shopify's help center, there's a limit of 20,000,000 unique discount codes per store. Once it's reached, you can create new codes after deleting old ones.

Related problems