How do you stop promo code abuse?
Use long random codes, limit the number of attempts per session and account, and set an expiry and a redemption cap. Bind a code to the recipient's account where the campaign allows it. Watch for a code spreading through deal sites, which shows up as a sudden change in who redeems it.
Start with how codes are generated. A code made of a word and a number, such as a campaign name followed by a percentage, can be guessed by a person and enumerated by a script. Sequential codes let anyone who holds one predict the next. Codes should be long enough and random enough that trying values at the rate your limits allow would take longer than the campaign lasts.
Decide between shared and unique codes. A shared public code is simple to promote and impossible to contain: once published, it is available to everyone. A unique code per recipient can be made single-use and tied to the account or email address it was sent to, so it has less value to anyone else. Unique codes take more work to distribute and are worth it for high-value discounts.
Codes leak through predictable channels. Deal and coupon sites collect them from users. Browser extensions test known codes automatically at checkout and report which ones work. Affiliates and influencers share codes beyond the audience they were meant for. Staff and partner codes are passed to friends. Treat a shared code as something recipients can redistribute.
Limit the damage in advance. Set a total redemption cap and an expiry date on every code. Require a minimum basket value, and exclude products where the margin cannot carry the discount. Where a code belongs to a channel, make it valid only for sessions that arrived through that channel's link, or only for accounts on the recipient list.
Protect the validation endpoint. Limit attempts per session, account and device, and return one generic message for all failures. A burst of failed attempts across many different values is enumeration, and it is visible in your logs before any code is found.
Watch the redemption curve. A targeted code has a recognisable shape: use rises after the send and tails off. A second rise from customers outside the intended audience indicates a leak. When that happens, retire the code and issue a replacement to the original recipients. This removes the leaked code without penalising the customers it was meant for.
Review each campaign afterwards and record which codes leaked and how quickly.
How Kairal helps
Kairal Bot Protection checks requests on the pages and APIs connected to your integration. You can configure protection per endpoint and review recorded decisions in Events; your application continues to enforce purchase limits and authorisation.
Kairal Bot Protection