# Creating and Using Discount Codes

Discount codes let you offer incentives for customers to buy your products.

Easy Digital Downloads supports flat-rate and percentage discounts, start and expiration dates for automated sales, and restrictions by product or category. Unless requirements or exclusions are placed on the discount code, it automatically applies to **every** product when used.

- [Creating a Discount](#creating-a-discount)
- [Redeeming Discount Codes](#redeeming-discount-codes)
    - [During Checkout](#during-checkout)
    - [Passed via URL](#passed-via-url)



Creating a Discount
-------------------

To create a discount, go to **Downloads** » **Discounts** and click **Add Discount**.

![The Add Discount button on Discounts dashboard in Easy Digital Downloads](https://easydigitaldownloads.com/wp-content/uploads/2022/01/edd-discounts-add-discount-800x225.png)Once you select the Add Discount button, you&#039;ll see the discount form to fill out.

![Creating a discount in Easy Digital Downloads](https://easydigitaldownloads.com/wp-content/uploads/2022/01/edd-discounts-form-800x504.png)**Note**: At minimum, a discount needs a Name, Code, and Amount.

Fill in the discount&#039;s details:

- **Name (required):** The name of this discount. Customers will see it at checkout.

- **Status:** Set the discount to **Active**, **Inactive**, or **Archived**.

- **Code (required):** The code customers enter at checkout to apply the discount. Only alphanumeric characters are allowed. To create one automatically, click **Generate Code** and set a Prefix, Length, and whether it includes Letters and Numbers.

![The automatic Generate Code tool for Easy Digital Downloads Pro users.](https://easydigitaldownloads.com/wp-content/uploads/2022/01/edd-discounts-generate-code-tool-740x300.png)- **Amount (required):** The discount as a percentage or a flat rate. Use 100% to make the discount free. This cannot be left blank.

- **Download Requirements:** The downloads this discount can be applied to. Leave blank to allow any. When a product is selected in the Download Requirements, additional options appear.

- **Downloads Excluded:** The downloads this discount cannot be applied to. Leave blank for none.

- **Categories**: Optionally include or exclude products by category. Leave blank for any.

![Selecting categories while creating a discount in EDD.](https://easydigitaldownloads.com/wp-content/uploads/2022/01/creating-discounts-categories-edd-740x178.png)- **Start date:** The date and time (UTC) the discount starts. Leave blank for no start date.

- **Expiration date:** The date and time (UTC) the discount expires. Leave blank to never expire.

- **Minimum Amount:** The minimum cart subtotal required before this discount can be applied.

- **Max Uses:** The maximum number of times this discount can be used.

- **Use Once Per Customer:** Toggle this on to prevent customers from using the discount more than once.

![More fields on the add discount form in Easy Digital Downloads.](https://easydigitaldownloads.com/wp-content/uploads/2022/01/discount-dates-uses-edd-800x355.png)When you&#039;re done, click the **Create Discount** button in the top-right of the screen.

Redeeming Discount Codes
------------------------

Discount codes can be applied in two ways.

### During Checkout

On the checkout page, the customer sees an option to enter a discount code. After they enter a code and click apply, the cart total updates immediately.

![Entering a discount code at checkout from an Easy Digital Downloads store.](https://easydigitaldownloads.com/wp-content/uploads/2022/01/enter-discount-code-checkout-edd.gif)This link only appears if you have at least one active discount. If you have no active discounts, customers won&#039;t see the option to enter a code at checkout.

### Passed via URL

Any URL on your site with `?discount=CODE` (where CODE is your discount code) stores that code in a session, so when the customer reaches checkout, the code is automatically applied.

**Note:** If using this in conjunction with a [custom add to cart link](https://easydigitaldownloads.com/docs/creating-custom-add-to-cart-links/), use the `&amp;` symbol in place of the question mark if the discount code is the last item. Example:

`https://yoursite.com/?edd_action=add_to_cart&amp;download_id=XXXX&amp;discount=XXXX`