How to generate enormous amount of discount codes

Hi we have a partner that wants 200.000 discounts to send out to their subscribed community.

Is it possible to make that many discountcodes in Shopify, without involving a lot of apps or doing it manually (which I would rather avoid)?

Hi Mns-Burg,

If you don’t want to use an app, and also don’t want to do it manually, your only option is custom coding.

You can use this API:

https://shopify.dev/docs/api/admin-graphql/2025-01/mutations/discountCodeRedeemCodeBulkAdd

I’ve found through experimentation that you can batch up to 3000 new codes at a time. Any more than that, and you’ll have to wait a bit between the batches. So, you’d need to create a script that could:

  1. Split up your codes into groups of 3000 (you’ll have 67 groups)
  2. Split these groups of 3000 into 100 and call discountCodeRedeemBulkAdd
  3. Continually monitor the status of these bulk add jobs, and queue new ones as soon as one completes.

Our app, Regios Discounts (4.8 stars, 83 reviews, Built for Shopify), does have a bulk discount code generation feature, but it has to adhere to the limit of 3000, and it currently doesn’t have monitoring functionality (as mentioned in step 3) to automatically queue new jobs when you have over 3000.

If you have further questions about this, just reply, and I’ll be happy to help.

Best,

Tobe

Shopify’s native discount code generator allows bulk creation, but it has a limit of 100,000 discount codes per set—so you’d need to create two separate batches. You can do this under Discounts > Create Discount > Bulk Discounts, then export the codes if needed.

If you need more automation, Shopify Scripts (for Plus users) or Shopify Flow (for automating processes) might help. Otherwise, third-party apps like Bulk Discount Code Generator can handle this efficiently without manual work.

Hi @mns-burg

Shopify doesn’t natively support generating that many unique discount codes in bulk, but you can use Shopify’s Bulk Discount Code Generator (a free app by Shopify) to create thousands at once.

If you’re on Shopify Plus, you can also use the Discount API to automate this process without a third-party app. Another workaround is to create a single-use automatic discount link instead of individual codes, which might be easier to manage.

If you must create exactly 200,000 unique codes, using an app is the best route, either Shopify’s own or a bulk discount app like Bulk Discount & Auto Tagging

1 Like

Hey @mns-burg

Shopify offers an in-built discount generator. You can generate in bulk (there might be a clause to these things and limit which I suggest you do the research). Otherwise, you can try doing this on your Shopify Admin:

  1. You can create a “discount set” to generate many discount codes at once. For this, go to “Discounts” > click “Create discount set” under the “More Actions” menu.

  2. Enter the details, like how many codes to create, the discount type, value, and any restrictions/limits/rules you wish to apply.

  3. Export the codes after being created.

:grinning_face_with_smiling_eyes: I hope I was able to help in some way.

1 Like

I am not able to find any build in discount bulk solution in Shopify. Like you mention.
Do you mean in the “Bulk Discount Code Generator”?

I’m unable to find a "Bulk Discounts" function in my Shopify admin.
When I click Create Discounts, I’m only able to see these options as default.

Hey
I see. I actually re-checked it myself and even I am surprised it is not there.
I checked further and it says you have to manually do it: Discount > Create discount > “Buy X get Y” or “Amount off products” > Under Method, choose Discount code.

My apologies, I thought this method would work. However, you can import a CSV file containing multiple discount codes.
Also, Shopify suggests using an app to produce multiple codes. Now, I know you are not keen on using any apps. The only option that remains is to do it manually, which is not ideal. If you can spend $3 or $5 on creating, then that’s fine, otherwise I do not see any other option. This is one app - https://apps.shopify.com/bulk-discounts
Check on the app store if there are any free options available.

Also, what do you mean by “Bulk Discount Code Generator”? Is that an app or an option