Discount Code Rules
When you let customers apply a discount code to an order after checkout, you decide which codes they can use and when. Two rules give you that control, so you can open up self-serve discounts without worrying about internal codes leaking out or discounts stacking on already-discounted orders.
These rules live in the Apply discount code panel of Editing rules. They only matter when Apply discount code is turned on for your customers.
Why this matters
Without these rules, any customer who knows a valid code string can apply it to their order through the widget, including staff codes, wholesale codes, or codes from a campaign that already ended. Some merchants react by switching Apply discount code off entirely, which loses all the self-serve value.
Instead of turning the feature off, you can keep it on and:
- Limit customers to only the discounts you approve, and
- Block codes on any order that already has a discount.
Rule 1 — Which discounts can customers apply
The first card, Which discounts can customers apply?, has two options.
| Option | What it means |
|---|---|
| All discounts (default) | Customers can apply any active discount on your store. This is the original behavior. |
| Select discounts | Customers can only apply the specific discounts you pick. Any other code is refused. |
Selecting discounts
When you choose Select discounts, a Select Discount button appears. Click it to open a picker that lists the real discounts on your store. Search by code or title, tick every discount you want to allow, then click Select. Each chosen discount shows up as a chip, and you can remove one with the small x on its chip.
A few things to know about the picker:
- The list comes straight from your Shopify discounts, so you cannot mistype a code or pick one that does not exist.
- If your store has no discounts yet, the picker shows an empty state. Create a discount in your Shopify admin first, then come back.
- If you later delete or rename a discount in Shopify, it simply stops being applicable and drops out of the picker. Nothing breaks.
You must select at least one discount before you can save. If you switch to Select discounts but leave the list empty, saving is blocked with an inline error.
Switching back to All discounts keeps your selected list, so you can flip between the two without re-picking. While All discounts is active, the list is just ignored.
Code matching is case-insensitive, so welcome10 and WELCOME10 are treated as the same code.
Rule 2 — Only if the order has no discount yet
The second card, When customers can apply one, has a single checkbox:
Only allow codes if the order has no discount yet.
Turn this on when you do not want customers stacking a new code on top of a discount the order already has. This covers any existing discount on the order, whether it came from a code at checkout, an automatic discount, or a manual discount you added yourself.
When the order already has a discount and this rule is on, the customer does not see the code field at all. Instead they see a short note telling them a discount is already applied, along with the existing code and its value.
This rule only affects applying discount codes. It does not lock other edit types, so changing the shipping method (including free shipping) still works as usual.
What the customer sees
When everything passes, the customer applies a code, sees the savings, and the difference is refunded when they save the order. Because applying a code to a paid order always lowers the total, a refund is always issued for the difference. Where that money goes follows your Refund destination setting: back to the original payment method, or to store credit.
If a code is refused, the customer sees a clear message so they can decide what to do next.
| Situation | Message the customer sees |
|---|---|
| Code is not on your allowlist, or does not exist | "This code isn't valid for this order." |
| Code has expired or is not active yet | "This discount code is no longer active." |
| Order has not reached the code's minimum spend | "Add $X more to your order to use this code." |
| Code has run out of uses | "This discount code is no longer available." |
| Customer already used a one-per-customer code | "This code has already been used on one of your orders." |
| Code is already applied to the order | "This code is already applied to your order." |
| Code cannot be combined with another code on the order | "This code can't be combined with another code on your order." |
Codes that are not on your list, and codes that do not exist, both show the same generic message on purpose. That keeps your allowlist private, so customers cannot fish for which codes are allowed.
The code's own rules from Shopify (expiry dates, usage limits, one-use-per-customer, minimum spend, and whether it can be combined) are always enforced, even for a discount you selected in the picker. Picking a discount decides that customers are allowed to try it, it does not skip the discount's own conditions.
Why applied codes don't appear in Shopify's discount reports
Shopify has no way to add a real discount code to an order that already exists. To make self-serve codes work, the app reads your code, checks it, and applies the same value as a manual discount on the order. It also writes a staff note and an entry on the Activity page recording the code and amount.
Because of this, orders edited this way carry a manual discount rather than a code discount, so they do not show up in Shopify's "Top discount codes" report. This is a Shopify limitation, not a bug. The app keeps its own record of every applied code so you can still trace them through the Activity page.
Good to know
- Server checks everything. Both rules are enforced on our server before any change is made, so a customer cannot get around them by editing the page.
- Nothing changes for existing stores. If you never open these settings, the default is All discounts with Rule 2 off, which is exactly the previous behavior.
- Both rules can be on together. If an order already has a discount, Rule 2 hides the field first. If the order has no discount, Rule 1 then decides which codes are allowed.
See also
- Allowed edit types, turn Apply discount code on or off
- Refund destination, where refunds from applied codes go
- Activity page, where applied codes are recorded