A customer enters a discount code and sees “Invalid.” The shop may know exactly why it failed, but the customer does not. Was it mistyped, expired, restricted to certain products or already used? One vague word turns an ordinary condition into a guessing game.
Match the message to the reason
Start with the actual validation result. If the code has expired, say so. If it requires an eligible basket total, explain that condition in the same terms used in the promotion. Do not use “expired” as a generic label for every failure.
These invented examples show the difference:
- Instead of “Code error,” use “This code ended on the date shown in the offer.”
- Instead of “Not applicable,” use “This code applies to the listed products; none are currently in your basket.”
- Instead of “Try again,” use “Check the code for a missing character, or continue without it.”
The final wording must match the store’s real rules. A message should not encourage someone to add products unless that action can actually satisfy the offer.
Keep the checkout usable after failure
Preserve the basket and information already entered. Place the explanation near the code field and make it available to assistive technology. Let the customer remove or replace the code without restarting the purchase.
Check the successful state too. Show the applied saving and updated total clearly, including whether the discount affects shipping or only eligible items. The customer should not need mental arithmetic to discover what happened.
Test a small set of real cases: a valid code, a typo, an expired promotion, an excluded product and a combination the store does not allow. Have someone unfamiliar with the rules explain what they would do after each message.
Good checkout copy does not make every code work. It makes the result understandable and gives the customer a truthful route forward, including the choice to finish without the promotion.

