#hassanxelamin - NextJS

1 messages · Page 1 of 1 (latest)

winged obsidian
fluid goblet
#

I have my key in a .env.local file

winged obsidian
#

hi 👋

fluid goblet
#

grabbing it here to initiate checkout

winged obsidian
#

reading

fluid goblet
#

this is the checkout function that is fired when i click buy now

winged obsidian
#

Could you log the value of the API key in your code and verify it exists in runtime?

fluid goblet
#

Just did it. It exists in runtime

#

Still gives this error: "Uncaught (in promise) IntegrationError: Invalid API Key provided: "pk_test**************************************************************************************************L5","

#

I triple checked the test key in my developers section of stripe dashboard and it is correct

winged obsidian
#

Did the API error message change or did you reword it earlier?

fluid goblet
#

I just didn't add the part that included the abbreviated test key before. It is still the same.

winged obsidian
#

Could you send the key in plain text so we can test it?

fluid goblet
#

"pk_test_51KBQ64KoVJaPayW9PQlF3unw9rXyFHkRAviloCiBf5S5cRKbkHuPlKP2I6S30hkBmHvsYfHfTrEW6rpcvYgGm6RW00zIk0pQL5"

winged obsidian
#

Oh oh oh. You need to remove the quotes. After that it should work