# Discount Code Generator

The [Discount Code Generator](https://easydigitaldownloads.com/downloads/discount-code-generator/) extension for Easy Digital Downloads allows site administrators to generate discount codes in bulk and then export them directly to CSV.

### Setup

There are no setup steps/configuration. Once install and activated, the Discount Code Generator functionality is immediately available. ### Usage

After you have [installed and activated](https://easydigitaldownloads.com/docs/how-do-i-install-an-extension/) the Discount Code Generator extension, you will then navigate to ***Downloads → Discount Codes***. You will see a &quot;Generate Codes&quot; button that will be used to generate the discount codes. ![](https://easydigitaldownloads.com/wp-content/uploads/2022/07/6184cdb4312b6.png)Clicking on the &quot;Generate Codes&quot; button will present the Discount Code Generator screen where you can apply settings for the discount codes that will be created. ![](https://easydigitaldownloads.com/wp-content/uploads/2022/07/6184cdb48118b.png)**Number of Codes:** This is the number of discount codes to be created. **Name:** This is the name of the discount code. Each code will be appended with a number (Example: New Discount-1). **Code:** Select the format in which the code is created as well as the number of characters used. **Type:** Choose whether the discount is a percentage or flat amount. **Amount:** Choose the amount of the discount. **Downloads Requirements:** Select downloads for the discount to apply to and choose whether to only apply the discount to those selected Download(s). Leave blank for all Downloads. **Start Date:** Choose the date that the discount code will start. Leave blank to start immediately. **Expiration Date:** Choose the date that the discount code will end. Leave blank to work indefinitely. **Minimum Amount:** Choose the minimum amount to be spent in order for discount code to apply. Leave blank for unlimited. **Max Uses:** Choose the maximum number of times that the discount code can be used. Leave blank for unlimited. **Use Once Per Customer:** Choose whether or not the discount code should be used only once per customer. 
### Discount Code Generation

Once the settings are in place, click the &quot;Create Codes&quot; button and your discount codes will be automatically generated. ![](https://easydigitaldownloads.com/wp-content/uploads/2022/07/6184cdb4ce564.png)### Export

If needed, you can navigate to ***Downloads → Reports → Export***. Then click &quot;Generate CSV&quot; in the Export Discount Codes in CSV section. ![](https://easydigitaldownloads.com/wp-content/uploads/2022/07/6184cdb51e2d4.png)You will then be given a .csv file containing all Discount Codes. ![](https://easydigitaldownloads.com/wp-content/uploads/2022/07/6184cdb55eff7.png)