#africannatural_api

1 messages ¡ Page 1 of 1 (latest)

dense oasisBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1361613645737492571

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

vivid orbit
#

hi there!

#

but I keep getting this error: "No such token: tok_1RC017GUMPfhpk9pwGOS4BHp a similar object exists in test mode, but a live mode key was used to make this request."
the error seems pretty clear. you cannot use a test mode object for a livemode request.

prisma galleon
#

Hello

#

I don't understand really. The problem is that I can't make payments when I enter the details of a live card

#

And i've tried multiple live cards

vivid orbit
#

are you a software developer?

prisma galleon
#

Yes

#

I'm guessing someone used that live card on test mode right?

vivid orbit
#

Stripe has two "modes": test mode an live mode. you cannot mix test mode obejcts with live mode requests. so it's expected that you get an error

#

you made a livemode request, but are using a test object (tok_1RC017GUMPfhpk9pwGOS4BHp)

#

that's exactly what the error is telling you:

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

#

so you need to review you code, to make sure you use livemode request with livemode objects

prisma galleon
#

Honestly, I didn't write this code, we are outsourcing this project, but just to clarify.

By object right now do you mean the details of a card used in transaction or the public and secret key?

vivid orbit
#

Honestly, I didn't write this code, we are outsourcing this project, but just to clarify.
also, your code is using Tokens, which is a very old API we don't recommend using

prisma galleon
#

When I run tests on stripe test mode and use the 4242424242 card, everything works fine, but when I switch to live and use my company debit card that's when I get this error.

I use stripe on all of our other products and I have never encountered this problem.

vivid orbit
#

but when I switch to live
that's the issue. you didn't switch entirely to livemode, since the tok_1RC017GUMPfhpk9pwGOS4BHp is still created in test mode.

prisma galleon
vivid orbit