WP Simple Pay Documentation

Documentation, Reference Materials, and Tutorials for WP Simple Pay

How to Resolve ‘rest_cookie_invalid_nonce’, ‘Cookie nonce is invalid’, ‘Cookie check failed’ Errors

Reading time: 2 minutes | Difficulty: Beginner

Overview

The messages Cookie nonce is invalid, Cookie check failed, and rest_cookie_invalid_nonce mean that the security token (nonce) sent with a payment form request was no longer valid. WordPress nonces expire after 12 hours. These errors were 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, payment forms fetch a fresh token every time the page loads. For logged-out visitors, an expired token left in a cached page is ignored, so the form still loads and takes payments.

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

  1. Clear your site’s cache, including any cache run by your web host. Pages cached before the update still hold the old form code.
  2. Reload the payment form page and try again.

If only logged-in users see the error, make sure your caching plugin doesn’t serve cached pages to logged-in users. Most caching plugins skip logged-in users by default.

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:

What’s Next?

Still have questions? We're here to help!

Last Modified:

Start Accepting Payments Today

Start accepting one-time and recurring payments or donations on your WordPress website.