“No such token” error message

Making a payment results in the above error.

What happened?

When a customer tries to make a payment on a one-time payment form or on a subscription form, an error message similar to this one is displayed:

“No such token: tok_1C34ABIzbD5xhTHTZk6ySIJj; a similar object exists in test mode, but a live mode key was used to make this request.

Why is it happening?

Either of the following scenarios can cause the error:

  1. Several Stripe plugins are activated, and one of them is in live API mode, and the other one is in test API (or vice versa).
  2. The payment page is cached, and it’s storing the live publishable key while the plugin is in test mode (or vice versa).

What is the solution?

Several Stripe plugins are activated

Make sure that all Stripe plugins are in the same API mode.
Ideally, WP Full Stripe should be active, and you should deactive all other Stripe plugins.

The payment page is cached, the wrong publishable key is stored

When you change API mode, always purge the cache.
Ideally, you should add a rule to the cache to not cache the payment page at all.

Still not finding the solution?

Our support team is happy to help you.

Contact support

Feature requests are always welcome!
We consider each feature request carefully, and examine how it fits the roadmap for the plugin.