#Chris109-ephemeralKey
1 messages · Page 1 of 1 (latest)
Hi, your code looks correct to me hmm
const ephemeralKey = await stripe.ephemeralKeys.create(
{customer: customer.id},
{apiVersion: '2020-08-27'}
);
That's my thinking as well, but I keep getting the same error.
Latest version of Stripe Node ?
Sorry I'm quite new to programming, how would I check that?
6.36.0
Does that seem possible?
let me check
latest is 10.0.0
6.x.x sounds pretty old
Ah okay I'll update then check
So after some googling, it seems that I was on 10.0.0 already.
Are you sure? You should look at your package-lock.json to know your version
instead of googling
Jip 100% google just told me to look there.
Double checked by making it a normal string, still same issue
Weird, that looks perfectly fine to me. I am using your code and can don't encounter an error
typeof customerId = string?
Jip typeof == string
Can you comment out the 2nd line of apiVersion and stripeAccount?
if you only pass in customer, would it work?
Do you still get typeof customerId is string?
it boils down to the customerId value
fm?
stripeVersion
so it's a new error?
Yes new error
Okie, sorry, can you move back that line, but instead of apiVersion, use stripeVersion instead
As the key?
Let's see
Btw are you developing in local or deploying to some remote host?
Just haven't tried it yet
But will obviously make testing easier and faster
Same as error as when apiVersion was used
What if you remove the stripeAccount parameter, just keep apiVersion?
Same issue as before.
That's really weird. I can't reproduce at all
Can you try a simple local Node and use the same syntax?