Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

hughsaffar's avatar

Cashier/Stripe fails after switching to Live mode

Hey folks,

Just switch from test to live mode in Stripe. I also changed the Publishable and Secret keys from Test to Live. Now when I try to subscribe to a plan I get message from Stripe as follow:

error:
type: "invalid_request_error"
message: "No such token: tok_174Y0yHYKAFEjmHERXShzPuE; a similar object exists in test mode, but a live mode key was used to make this request."
param: "source"

I also deleted all test data from Stripe. Have you guys ever experienced something like this?

0 likes
2 replies
hughsaffar's avatar
hughsaffar
OP
Best Answer
Level 21

Okay, found the problem. I should have changed the Publishable key in the JavaScript file too.

Please or to participate in this conversation.