How to Resolve the ‘Coupon security check failed’ error
In This Document
Reading time: 2 minutes | Difficulty: Beginner
Overview
The message Coupon security check failed means the security token (nonce) the payment form sent with a coupon request was no longer valid. WordPress nonces expire after 12 hours. The error was most often caused by a caching plugin or web host serving a cached copy of the page that held an old token.
Since WP Simple Pay 4.17.5, each payment form fetches a fresh token from your site every time the page loads, so cached pages no longer cause this error.
Prerequisites
- Access to your caching plugin’s settings, or your web host’s cache controls
How to Fix It
On WP Simple Pay 4.17.5 or Later
- Clear your site’s cache, including any cache run by your web host. Pages cached before the update still hold the old form code.
- Reload the payment form page and try the coupon again.
If the error continues, another plugin or server rule may be changing requests to your site. Follow How to Test for Theme and Plugin Conflicts.
On Earlier Versions
Update WP Simple Pay to the latest version. If you can’t update yet, make sure pages with payment forms are either not cached or not cached for longer than 12 hours:
- Set the cache limit in WP Fastest Cache
- Set the cache limit in WP Rocket
- Set the cache limit in W3 Total Cache (see Garbage Collection Interval)
- Set the cache limit in WP Super Cache (see Garbage Collection)
What’s Next?
- How to Resolve Issues Caused by Cache and Optimization Plugins – General caching guidance
- How to Resolve ‘rest_cookie_invalid_nonce’ Errors – A related security token error
- How to Add and Configure Coupons – Set up coupons for your payment forms
Still have questions? We're here to help!
Last Modified: