Shopify Discount Code Not Applying at Checkout

A customer enters a valid discount code and Shopify replies "Enter a valid discount code" — even though the code exists and has not expired.
The code is almost never the problem. Shopify rejects codes for eligibility reasons it does not explain to the shopper, and each one has a different fix.
Symptom
- Checkout shows
Enter a valid discount codeorThis code isn't valid for the items in your cart. - The discount exists in Discounts and shows as Active.
- It may work for you as the store owner but not for a customer, or work on one product but not another.
Cause
Work through these in order — they account for nearly every case.
1. An automatic discount is already applied
This is the most common and least obvious. Shopify will not stack a code on top of an automatic discount unless both are explicitly set to combine. The shopper sees no indication the automatic discount is what blocked theirs.
2. Combination settings are off
Each discount has three independent toggles: combine with product, order, and shipping discounts. A code that combines with nothing silently fails whenever anything else applies.
3. Minimum requirements are not met
A minimum purchase amount is evaluated after other discounts. A cart at $100 with a 20% automatic discount is $80, so a code requiring $100 minimum now fails.
4. Customer eligibility
If the discount is limited to specific customers or segments, a guest checkout can never satisfy it — the shopper is not logged in, so Shopify cannot match them.
5. Product scope excludes the cart
A discount limited to a collection fails if the cart contains anything outside it and the discount is set to apply to the order rather than specific items.
6. Usage limits already hit
"One use per customer" is tracked against the customer account and the email at checkout. A repeat buyer using the same email is blocked even on a fresh session.
Fix
Isolate it first. Open Discounts → your code and check, in this order:
- Combinations — tick the discount types this code must coexist with.
- Minimum requirements — recompute against the discounted subtotal, not list price.
- Customer eligibility — set to "All customers" to test, then narrow again.
- Active dates — confirm the end date and the store's timezone under Settings → General.
To confirm an automatic discount is the culprit, temporarily deactivate it and retry the code. If the code works, the fix is combination settings, not the code.
Checking programmatically
If you are debugging at scale, the Storefront API returns the reason:
const res = await fetch('/api/2026-01/graphql.json', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Shopify-Storefront-Access-Token': token,
},
body: JSON.stringify({
query: `mutation($cartId: ID!, $codes: [String!]!) {
cartDiscountCodesUpdate(cartId: $cartId, discountCodes: $codes) {
cart { discountCodes { code applicable } }
userErrors { field message }
}
}`,
variables: { cartId, codes: ['SUMMER20'] },
}),
});
applicable: false with no userErrors means the code exists but the cart does not qualify — which points at eligibility, not a typo.
Surfacing the reason to the shopper
Default themes show a generic message. Reading applicable lets you say something useful:
const { discountCodes } = result.data.cartDiscountCodesUpdate.cart;
const rejected = discountCodes.filter((d) => !d.applicable);
if (rejected.length) {
showMessage(
`"${rejected[0].code}" cannot be combined with the discount already applied.`
);
}
Verify
- Test in an incognito window as a guest — not as the logged-in store owner.
- Test with exactly one item that qualifies, then add a non-qualifying item.
- Test with the automatic discount both on and off.
- Confirm the discounted total matches what you expect, not just that the code is accepted.
Prevent
- Decide a combination policy once and apply it to every new discount, rather than per-code.
- Set minimums against the discounted subtotal you actually expect shoppers to reach.
- Show the reason in the UI. A shopper told "cannot be combined with your current offer" does not email support.
Frequently asked questions
Why does the code work for me but not for customers?
You are likely logged in with a customer account that satisfies an eligibility rule, or you are testing a cart that happens to qualify. Always retest as a guest in a private window.
Can two codes be used at once?
A shopper can enter multiple codes, but they only stack if every combination setting allows it. Shopify applies at most one discount per type — one product, one order, one shipping.
Does this differ on Shopify Plus?
Plus adds scripts and Functions, which can implement custom discount logic. That also adds a cause: a Function can reject a code before the standard rules are ever evaluated.
Related reading
- Traffic but no sales? Start here
- Duplicate GA4 events inflating revenue
- Shopify conversion optimization — our service page
Need a hand?
We fix checkout and conversion problems on Shopify stores in the USA, UAE, Saudi Arabia, Qatar and the UK. If discounts are costing you orders, get a free audit or see our Shopify conversion optimization service.
The Yaxify Team
Shopify & Web Development Agency
We build custom Shopify stores and high-performance websites for growing businesses across the USA, UK, and UAE. Everything we publish comes out of client work we have actually shipped.
More about Yaxify →