Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 21 additions & 8 deletions docs/specification/discount.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,27 @@ via the `messages[]` array:

**Error codes for rejected discounts:**

| Code | Description |
| -------------------------------------- | ------------------------------------------- |
| `discount_code_expired` | Code has expired |
| `discount_code_invalid` | Code not found or malformed |
| `discount_code_already_applied` | Code is already applied |
| `discount_code_combination_disallowed` | Cannot combine with another active discount |
| `discount_code_user_not_logged_in` | Code requires authenticated user |
| `discount_code_user_ineligible` | User does not meet eligibility criteria |
| Code | Description |
| -------------------------------------- | ------------------------------------------------------------------------------ |
| `discount_code_expired` | Code has expired |
| `discount_code_invalid` | Code not found or malformed |
| `discount_code_already_applied` | Code is already applied |
| `discount_code_combination_disallowed` | Cannot combine with another active discount |
| `discount_code_usage_limit_reached` | Code has reached its maximum number of allowed uses |
| `discount_code_stacking_conflict` | Code is valid, but a higher-priority discount already applied takes precedence |
| `discount_code_user_not_logged_in` | Code requires authenticated user |
| `discount_code_user_ineligible` | User does not meet eligibility criteria |

`discount_code_usage_limit_reached` differs from `discount_code_already_applied`:
the latter means the buyer is trying to apply a code that is already active on
*this* cart or checkout; the former means the code's overall usage allowance
(global or per-customer) has been exhausted by other carts/customers.

`discount_code_stacking_conflict` differs from `discount_code_combination_disallowed`:
the latter means the business has an explicit rule that these specific
discounts cannot combine; the former means the code matched and was valid,
but discount-stacking or best-deal resolution rules resulted in a different,
already-active discount taking precedence instead.

## Automatic Discounts

Expand Down
Loading