When a promo code fails at checkout, most systems just say no. That single word costs you twice: the customer doesn't know whether the code expired, didn't apply to their cart, or was already used, and you can't tell later which of those was happening most. We write the rejection reason into the type the checkout returns, so the page can explain itself and the numbers stay countable. Same story with the discount arithmetic — it belongs inside the money type with hard limits, not scattered across the places that happen to call it. Our new article walks through it: https://shipmindlabs.com/c/42616974
What does your checkout tell a customer when their code doesn't work?