On this page
What this issue is
A coupon applies the wrong amount when the discount shown in the cart or at checkout is different from what the offer says. The code is accepted, but the maths is off. The result can be too small (shoppers feel misled) or too large (you give away margin).
This is different from a code that is rejected or expired. Here the coupon works, so nobody gets an error. That is why it often goes unnoticed for weeks.
Common causes:
| Cause | What you see |
|---|---|
| Coupon applies to the wrong items or categories | Discount is smaller than expected because only some products qualify |
| Percentage taken before or after tax or shipping | Total is off by the tax or shipping amount |
| Fixed amount applied per item instead of per cart | Discount is multiplied by quantity |
| Sale-priced items included or excluded unexpectedly | Discount does not match the advertised price |
| Rounding or currency conversion | A few cents or pence off, or larger on multi-currency stores |
| Two discounts overlapping (automatic discount plus code) | Discount larger than the code alone should give |
| Wrong value typed in the coupon settings | 10 entered instead of 15, or a fixed amount instead of a percentage |
Why it costs you leads or sales
If the discount is too small, shoppers see a total higher than the ad or email promised. Many leave at that point, and some will not trust the store again. If the discount is too large, orders still come in, but each one costs you margin you did not plan to give away, and it is hard to claw back.
Example: a $100 cart with a promised 20% off. The correct total is $80. A coupon that applies only 10% charges $90, and one that applies 30% charges $70.
How to check if your site has it
Write down the promised offer
Note the exact terms from the ad, email or landing page: percentage or fixed amount, eligible products, minimum spend, shipping and tax rules.
Build a test cart
Add a typical product, then try a cart with several items, a sale item and different quantities.
Calculate the expected total
Work out the new total yourself, including tax and shipping as your store normally handles them.
Apply the code and compare
Compare the cart total, the checkout total and the order confirmation. All three should match your calculation.
Test other conditions
Try a different country, currency, shipping method and logged-in versus guest, since each can change the result.
- Discount line matches the promised percentage or amount
- Only eligible items are discounted
- Tax is calculated on the discounted price where it should be
- Shipping is handled as the offer says
- Cart, checkout and confirmation email show the same total
- No automatic discount is stacking with the code
How to fix it
First find out which rule is causing the difference, then correct it in your platform. The steps differ by platform.
Open the coupon
In WooCommerce go to Marketing > Coupons and edit the code.
Check the discount type
On the General tab, confirm Percentage discount, Fixed cart discount or Fixed product discount is the right one. Fixed product discount applies per item.
Review restrictions
On Usage restriction, check Exclude sale items, products, categories and minimum spend.
Check tax and rounding settings
Under WooCommerce > Settings > Tax, check whether prices are entered including or excluding tax and how rounding is set.
Disable conflicting plugins
If the maths is still off, test with other discount, pricing or currency plugins turned off on a staging copy.
Open the discount
In Shopify admin go to Discounts and open the code.
Check value and applies-to
Confirm the percentage or fixed amount and whether it applies to all products, specific collections or specific products.
Check combinations
Under Combinations, see whether other product, order or shipping discounts can combine with it.
Check markets and currency
Fixed amounts can be converted in other markets, so test in each market you sell to.
Look for automatic discounts and apps
An automatic discount or a discount app may be adding to the code's effect.
Open the discount
In the Ecommerce panel go to Discounts and edit the code.
Check type and scope
Confirm percentage or flat amount and whether it applies to the whole order, specific items or shipping.
Review minimums and limits
Check minimum order value and any category or product restrictions.
Retest in the live checkout
Publish, then place a test order and compare totals.
Open the coupon
In the Wix dashboard go to Marketing > Coupons.
Check the type and what it applies to
Confirm percentage, fixed amount or free shipping, and whether it covers all products or selected ones.
Check automatic discounts
Review any other active discounts that may overlap.
Retest
Apply the code in a fresh cart and compare totals.
Open the discount
In Commerce go to Discounts and edit the code.
Check type and scope
Confirm percentage, fixed amount or free shipping, and which products it applies to.
Check minimum and stacking rules
Review the minimum order and any other active discounts.
Retest
Place a test order and compare the total with your calculation.
Find the discount function
Locate the code that calculates the discount and the order of operations: subtotal, discount, tax, shipping.
Use integer money values
Calculate in the smallest currency unit (cents or pence) and round once, at the end.
Cap fixed discounts
A fixed discount should never be larger than the eligible subtotal.
Add unit tests
Test several carts, quantities and currencies against known expected totals.
function applyPercentCoupon(eligibleSubtotalCents, percent) {
const discount = Math.round(eligibleSubtotalCents * percent / 100);
return Math.min(discount, eligibleSubtotalCents);
}
// 20% off a 10000-cent cart
applyPercentCoupon(10000, 20); // 2000Broken
- Discount applies to the wrong items
- Fixed amount repeats per item
- Cart and checkout totals differ
- Customers see a price they did not expect
Fixed
- Discount matches the offer terms
- Fixed amount applies once per cart
- Totals agree from cart to confirmation
- Margin stays as planned
How to confirm it's fixed
Repeat your test carts after the change and compare each total with your hand calculation. Check the order confirmation email and the order in your admin, because the discount can look right at checkout but be saved differently.
- Single-item cart matches the calculated total
- Multi-item and mixed sale-item carts match
- Each market or currency you sell in matches
- Admin order shows the same discount as checkout
- Confirmation email total matches
How to prevent it happening again
- Write each offer's exact terms down before creating the code
- Re-test the code whenever you change prices, tax, shipping, currency or discount plugins
- Test after theme, plugin or app updates
- Keep a small set of reference carts with known expected totals
- Review active automatic discounts before launching a code campaign
How FunnelGuard handles this
FunnelGuard detects this issue today. A robot visitor runs your checkout journey on a schedule, applies the coupon and asserts the new total, so a total that does not match what you expect is flagged. If a check fails, it is re-checked from a second region before one alert is sent (email, Slack, Teams, WhatsApp, webhook or PagerDuty) with a screenshot and a likely cause.
Test traffic is marked (utm_source=funnelguard, fg_test=1, an fg_test cookie and its own user agent). FunnelGuard stops before payment unless your store's test mode is set up, and it never enters real card details. The Free plan covers 1 site and 2 journeys with daily checks and no card, and paid plans include a 3-day free trial.
Frequently asked questions
Questions people ask
Why is my coupon taking off the wrong amount?
The usual causes are a wrong discount type (per item instead of per cart), the code applying to different products than you intended, tax or shipping being included or excluded differently, or another automatic discount stacking with it. Check the coupon's settings first, then test with a simple one-item cart.
How do I test that a discount code calculates correctly?
Work out the expected total by hand from the offer terms, add the products to a cart, apply the code and compare the cart total, checkout total and confirmation email. Repeat with several items, a sale item and each market or currency you sell in.
Why does my percentage coupon not match 20% of the cart?
Some items may be excluded, such as sale items or certain categories, or the percentage may be applied before or after shipping or tax. Check the coupon's usage restrictions and your tax settings to see what the percentage is applied to.
Why does my fixed discount multiply when customers buy several items?
The coupon is probably set to a per-product type, such as Fixed product discount in WooCommerce, which applies once for each item. Switch it to a per-cart type if you want one discount for the whole order.
Can an automatic discount and a coupon give too much off together?
Yes. If your platform allows discounts to combine, a code can add to an automatic discount. Check the combination settings, such as Combinations in Shopify, and test with both active.
Can a coupon be wrong only in some countries or currencies?
Yes. Fixed amounts can be converted or rounded differently per market, and tax rules differ by region. Test the code in each market you sell in.
How can I be alerted when a coupon calculates wrongly?
A synthetic monitoring tool such as FunnelGuard can run your checkout on a schedule, apply the coupon and assert the new total. If the total is wrong, it re-checks from a second region and sends one alert with a screenshot.