#TARS-API-key

1 messages ยท Page 1 of 1 (latest)

runic sapphire
#

Hi ๐Ÿ‘‹ I'm not terribly familiar with Next.JS, but I think this chunk of your code is going to be problematic:
const stripe = new Stripe(process.env.STRIPE_SECRET ?? ''
My read on that is that an empty string will be passed as your API key if the environment variable isn't set. I'd recommend making sure you've set that environment variable, and remove the nullish operator as an empty API key will not work.

halcyon basin
runic sapphire
#

Awesome! Just be careful sharing you code if your secret key is hardcoded into it, make sure you don't upload it to public repos or anything similar.