“No such token” error message

Description: when making a payment, "no such token" error message appears.


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).

How to solve?

Several Stripe plugins are activated

Make sure that all Stripe plugins are in the same API mode.

Ideally, WP Full Pay 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.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us