Dev.to WebDev 🛠 Dev 👁 0 📖 2 min read

How to design better coupon error messages at checkout

A shopper enters SAVE15 and clicks Apply. The checkout says “Invalid coupon.” They try again, then remove an item, then wonder whether the code expired. A single error message has left them guessing about three different

A shopper enters SAVE15 and clicks Apply. The checkout says “Invalid coupon.” They try again, then remove an item, then wonder whether the code expired. A single error message has left them guessing about three different problems.

Coupon feedback is a small part of checkout, but it’s a good place to practice a useful rule for form design. When the system knows what happened, tell the shopper what they can do next.

Give different outcomes different messages

Here’s an example for a fictional store. Each message appears beside the coupon field.

Outcome What the shopper sees
The code has expired “This code has expired. Try another code.”
The eligible subtotal is 80 lei and the minimum is 100 lei “Add 20 lei in eligible items to use this code.”
The store can’t check the code right now “We couldn’t check your code. Try again in a moment.”
The discount is applied “SAVE15 applied. You saved 15 lei.”

Show the amount still needed only when checkout knows which items count toward the minimum. Otherwise, state the condition directly. That avoids asking shoppers to add products that still won’t qualify.

Keep the message and the total in sync

Imagine the shopper applies a code, sees a discount, and then removes an eligible item. If the code no longer applies, the explanation belongs next to the updated total. “SAVE15 was removed because your eligible subtotal is below 100 lei” gives the shopper a reason for the price change.

The same applies when a response arrives late. If the shopper changes the cart while a code is being checked, feedback for the previous cart can be misleading. A useful test is to start applying a code, remove an item before the response comes back, and check that the message and order summary both describe the current cart.

Make the coupon field easy to find

If the field starts collapsed, label the control “Add a promo code” and place it near the order summary. After the shopper applies a code, keep the result visible and show the discount as its own line in the summary.

I work on Voucher Reducere, where we also cover this from the shopper’s side. For examples of where people look for the field and how they confirm the price changed, see our guide to entering a discount code at checkout (in Romanian).

AI disclosure — This article was drafted with AI using a fictional checkout example.

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.