> ## Documentation Index
> Fetch the complete documentation index at: https://docs.checkoutrules.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Reject discount codes

> Do not allow certain discount codes based on the given conditions.

<iframe className="w-full aspect-video rounded-xl" src="https://www.youtube.com/embed/30WWcs5M88U?si=jNzFidc5ByOTVIUR" title="BeSure Reject discount codes" style={{ border: 0 }} allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen />

## Rule overview

This rule allows you to reject certain discount codes at checkout based on the defined conditions. You can block specific discount codes from being applied using criteria such as order total amount, customer tags, shipping address, product tags, etc.

When a customer enters a discount code that matches the configured conditions, the rule prevents the code from being applied and shows a custom rejection message at checkout. This helps enforce discount policies, protect margins, and prevent discount codes from being used in situations where they should not apply.

## Sample configuration

The following steps show how to create and configure a **Reject discount codes** rule using the app.

### Create a new rule

From your [Shopify admin](/guides/en/get-started/installation#go-to-the-app), open the app. In the sidebar, go to the [Rules](/guides/en/get-started/quickstart#create-a-sample-rule) section and click *"Create Rule"*.

Then, You’ll be redirected to the **Select checkout rule type screen**. Choose *category "Discount" → select checkout rule type "Reject discount codes" → click “Select Rule”*.

<img src="https://mintcdn.com/storespark/x2o2JFFdCDDV0vm9/images/essentials/discount/select-reject-discount-codes.webp?fit=max&auto=format&n=x2o2JFFdCDDV0vm9&q=85&s=16f8652e3a7662dca5da67b7d2c75e7e" alt="Select Reject Discount Codes" width="993" height="622" data-path="images/essentials/discount/select-reject-discount-codes.webp" />

Next, you’ll land on the **Create new order discount rule** screen, where you can configure your rule.

### Rule configuration

To configure the rule, first optionally we can add a name such as "Reject discount codes" to describe what it does. Then, select the rule [status](/guides/en/get-started/concepts#status): Testing, Active, Deactivated, or Scheduled.

Here, as an example, we are going to choose **Testing** status, so we can quickly test the rule without affecting the checkout for actual customers.

<img src="https://mintcdn.com/storespark/x2o2JFFdCDDV0vm9/images/essentials/discount/select-rule-status-reject-discount-codes.webp?fit=max&auto=format&n=x2o2JFFdCDDV0vm9&q=85&s=256ca995832d09bc2509090cc169616d" alt="Select Rule Status Reject Discount Codes" width="1109" height="565" data-path="images/essentials/discount/select-rule-status-reject-discount-codes.webp" />

As part of the [status](/guides/en/get-started/concepts#status) settings, the optional [schedule](/guides/en/get-started/concepts#schedule) section lets you control when an active rule starts and stops. Select a **Start date** and **Start time** for when the rule should begin. Optionally, check **Set end date** to choose an end date and time when the rule should automatically deactivate.

> If you select schedule dates while the rule is set to **Active**, the status becomes **Scheduled** instead of Active. The rule will run from the start date and time until the end date and time, if one is set.

<img src="https://mintcdn.com/storespark/4qWsVuvzOyUV38lJ/images/essentials/discount/schedule-status.webp?fit=max&auto=format&n=4qWsVuvzOyUV38lJ&q=85&s=b7c286a1661da52ea46b03bae1b86cde" alt="Schedule Status" width="993" height="552" data-path="images/essentials/discount/schedule-status.webp" />

<Note>
  For this example, we are not using a schedule and are keeping **Testing**
  status.
</Note>

Next, on the same screen, configure the [Combinations](/guides/en/get-started/concepts#combinations) settings to control how this order discount interacts with **other discounts**. You can choose to allow it to combine with:

* **Product discounts** – This lets the order discount be used alongside any product level discounts. Make sure product discounts are also configured to combine with order discounts.

* **Order discounts** – This enables multiple order level discounts to be applied together. Ensure the other order discounts are also set to combine with order discounts.

* **Shipping discounts** – This allows the order discount to be used together with shipping level discounts. Confirm that shipping discounts are also set to combine with order discounts.

<img src="https://mintcdn.com/storespark/zQqGNM0gkiGw9j3r/images/essentials/discount/combinations-discount-order-amount.webp?fit=max&auto=format&n=zQqGNM0gkiGw9j3r&q=85&s=d36ff72b3e6b808595d7e80ad4e0c6b0" alt="Combinations" width="967" height="267" data-path="images/essentials/discount/combinations-discount-order-amount.webp" />

Next, on the same screen, select the relevant [condition set](/guides/en/get-started/concepts#condition-set), [condition](/guides/en/get-started/concepts#conditions-when), and [action](/guides/en/get-started/concepts#action-what).

> As an example, here we are going to choose the default condition set 1. Then we are setting the rule to run when **Order subtotal amount** is **greater than or equal to** **300**, and configuring it to reject the discount code **"SAVE10"**. The rejection message **"This discount code cannot be used on this order"** will be shown to customers at checkout when they try to apply it.

<img src="https://mintcdn.com/storespark/x2o2JFFdCDDV0vm9/images/essentials/discount/condition-reject-discount-codes.webp?fit=max&auto=format&n=x2o2JFFdCDDV0vm9&q=85&s=a81a7cd68b6648a2056c0ab1b7cce73d" alt="Condition Set Reject Discount Codes" width="996" height="953" data-path="images/essentials/discount/condition-reject-discount-codes.webp" />

Also, you can optionally add translations for the rejection message in multiple languages by clicking **Add translation** and then selecting the languages you want to translate the message into. The main rejection message becomes the **default message** and is shown at checkout when no translation matches the customer’s language.

<img src="https://mintcdn.com/storespark/x2o2JFFdCDDV0vm9/images/essentials/discount/message-translations-reject-discount-codes.webp?fit=max&auto=format&n=x2o2JFFdCDDV0vm9&q=85&s=fde8c160c063f21aa497964f492a8530" alt="Message Translations Reject Discount Codes" width="1621" height="473" data-path="images/essentials/discount/message-translations-reject-discount-codes.webp" />

Finally, click the <b>Save</b> button at the top to create and save your rule.

<img src="https://mintcdn.com/storespark/ZoBcc0QT_aT_tX8T/images/shared/save-rule.webp?fit=max&auto=format&n=ZoBcc0QT_aT_tX8T&q=85&s=49b09a4f049059fd67144f92d10233ca" alt="Rule Save" width="713" height="184" data-path="images/shared/save-rule.webp" />

## Test the rule

Since, the rule is set to testing status, we have to use `test@testing.com` as the email, instead of the actual email, to run the rule at checkout.

<Warning>
  The image below shows the checkout page <b>before</b> the testing email
  address was used. Please note the discount code has not been rejected yet.
</Warning>

<img src="https://mintcdn.com/storespark/x2o2JFFdCDDV0vm9/images/essentials/discount/before-rule-apply-reject-discount-codes.webp?fit=max&auto=format&n=x2o2JFFdCDDV0vm9&q=85&s=2d786e3493212aac1c08de9317668bcb" alt="Before Rule Apply" width="1007" height="698" data-path="images/essentials/discount/before-rule-apply-reject-discount-codes.webp" />

After setting the email, the checkout rule runs when the **Order subtotal amount** is **greater than or equal to** **300** and rejects the discount code **"SAVE10"** when the customer tries to apply it. We can verify that the rejection message **"This discount code cannot be used on this order"** is visible at checkout, as shown below.

<img src="https://mintcdn.com/storespark/x2o2JFFdCDDV0vm9/images/essentials/discount/after-rule-apply-reject-discount-codes.webp?fit=max&auto=format&n=x2o2JFFdCDDV0vm9&q=85&s=e8a83bcfae94e42187730be8c09d5340" alt="After Rule Apply" width="1003" height="695" data-path="images/essentials/discount/after-rule-apply-reject-discount-codes.webp" />

## Activate the rule

Once testing is done, we can activate the rule, so it can start making changes to the checkout for actual customers. Only activated rules can make changes to the checkout for all customers.

Click on **Rules** in the sidebar to view all rules. Select the rule you want to activate, then click the **Activate** button to activate it.

<Warning>
  Rule activation is only available on paid plans. If you haven't upgraded your
  plan yet, follow the instructions
  [here](/guides/en/get-started/installation#upgrade-your-plan) to upgrade.
</Warning>

<img src="https://mintcdn.com/storespark/x2o2JFFdCDDV0vm9/images/essentials/discount/activate-reject-discount-codes.webp?fit=max&auto=format&n=x2o2JFFdCDDV0vm9&q=85&s=06e8c55e5a288ae9c36e47f63c49eef9" alt="Activate The Rule" width="1208" height="196" data-path="images/essentials/discount/activate-reject-discount-codes.webp" />

## Limitations

* This rule is incompatible with draft-order-based checkout and apps that use draft-order checkout.
* If your checkout URL includes `.../checkouts/do/...`, `do` stands for draft order. This rule won't run on that checkout.
