#Chris109-ephemeralKey

1 messages · Page 1 of 1 (latest)

tacit jolt
#

Hi, your code looks correct to me hmm

#
const ephemeralKey = await stripe.ephemeralKeys.create(
    {customer: customer.id},
    {apiVersion: '2020-08-27'}
  );
trail dock
#

That's my thinking as well, but I keep getting the same error.

tacit jolt
#

Latest version of Stripe Node ?

trail dock
#

Sorry I'm quite new to programming, how would I check that?

#

6.36.0
Does that seem possible?

tacit jolt
#

let me check

#

latest is 10.0.0

#

6.x.x sounds pretty old

trail dock
#

Ah okay I'll update then check

#

So after some googling, it seems that I was on 10.0.0 already.

tacit jolt
#

Are you sure? You should look at your package-lock.json to know your version

#

instead of googling

trail dock
#

Jip 100% google just told me to look there.

tacit jolt
#

Oh okie!

#

hmm

#

customerId Can you confirm this is not an object?

trail dock
#

Double checked by making it a normal string, still same issue

tacit jolt
#

Can you screenshot the error?

#

and the code

trail dock
#

Thanks for your help, really appreciate it.

tacit jolt
#

Weird, that looks perfectly fine to me. I am using your code and can don't encounter an error

#

typeof customerId = string?

trail dock
#

Jip typeof == string

tacit jolt
#

Can you comment out the 2nd line of apiVersion and stripeAccount?

#

if you only pass in customer, would it work?

trail dock
#

I'll re-deploy

#

Did not work. Same error. Damn

tacit jolt
#

Do you still get typeof customerId is string?

#

it boils down to the customerId value

#

fm?

#

stripeVersion

trail dock
#

Jip Still string

#

Got this when no apiVersion was given

tacit jolt
#

so it's a new error?

trail dock
#

Yes new error

tacit jolt
#

Okie, sorry, can you move back that line, but instead of apiVersion, use stripeVersion instead

trail dock
#

As the key?

tacit jolt
#

yes

#

I am just guessing. I don't think it's true

trail dock
#

Let's see

tacit jolt
#

Btw are you developing in local or deploying to some remote host?

trail dock
#

Deploying to firebase

#

I'm using cloud functions

trail dock
#

Just haven't tried it yet

#

But will obviously make testing easier and faster

#

Same as error as when apiVersion was used

tacit jolt
#

What if you remove the stripeAccount parameter, just keep apiVersion?

trail dock
#

Same issue as before.

tacit jolt
#

That's really weird. I can't reproduce at all

#

Can you try a simple local Node and use the same syntax?