---
title: "Verify coupon eligibility responds to cart threshold changes"
description: "Apply a minimum-spend coupon, reduce eligible items below its threshold, and verify the cart removes or rejects the discount according to policy."
canonical_url: "https://vostride.com/agent-library/shopping-cart/coupon-minimum-threshold.md"
md_url: "https://vostride.com/agent-library/shopping-cart/coupon-minimum-threshold.md"
content_kind: "recipe"
topic: "shopping-cart"
---

# Verify coupon eligibility responds to cart threshold changes

Apply a minimum-spend coupon, reduce eligible items below its threshold, and verify the cart removes or rejects the discount according to policy.

## Risk

A promotion valid at application time may become invalid after quantity changes. The threshold basis matters: products may use eligible merchandise subtotal before tax, shipping, or other discounts, so fixtures must define that calculation precisely.

## Fixtures

- A run-owned coupon with a documented eligible-spend minimum and known discount value.
- Products that place the cart just above the threshold, with one excluded item that must not count toward eligibility.
- Independent threshold calculations and a cart hook exposing promotion eligibility and applied discount.

## Steps

1. Build the cart just above the eligible-spend minimum and verify the independent eligible subtotal.
2. Apply the coupon and verify the expected discount and acceptance message.
3. Reduce an eligible product quantity so eligible spend falls below the threshold while total spend including excluded items remains higher.
4. Verify the application removes the discount or blocks checkout with the documented unmet-minimum explanation.
5. Restore the eligible quantity and verify the coupon reactivates automatically or requires reapplication exactly as documented; inspect final eligibility and discount state.

## Expected results

- The minimum threshold uses the documented eligible amount rather than all displayed spending.
- Dropping below the threshold prevents an invalid discount from reaching payable checkout.
- Returning above the threshold produces the documented recovery behavior.

## False-pass traps

- A cart total including shipping or excluded products can conceal an incorrect threshold calculation.
- Testing only initial coupon application misses eligibility changes caused by later cart edits.

## Cleanup

- Clear the fixture cart and deactivate the run-owned coupon.

## Use with agent-qa

Adapt this test design to your application's acceptance criteria and configured target using the [recipe execution guide](/agent-library/software-factory/turn-a-recipe-into-an-agent-qa-test.md). External fixture setup and non-UI checks require your own supported hooks or test tooling. Validate the authored test, execute it, and inspect the completed evidence; this recipe is not a recorded test result.

## References

- [agent-qa test](/docs/agent-qa/configuration/test.md)
- [agent-qa hooks](/docs/agent-qa/guides/hooks.md)
- [agent-qa auth state](/docs/agent-qa/guides/auth-state.md)

- [Shopping cart QA recipes](/agent-library/shopping-cart.md)
- [Software factory QA library](/agent-library.md)
