#Gyan

1 messages ยท Page 1 of 1 (latest)

tame novaBOT
wanton aspen
#

Hi ๐Ÿ‘‹ do you happen to know what request is being made when that error is encountered? Payment Sheet integrations use your publishable key and an ephemeral key, so I'm a little surprised to see an error saying you needed to provide a secret key and think this may be a server-side request that is failing.

tepid field
#

i am just logging the response, and that's where i see the first error message.

#

const response = await presentPaymentSheet();
console.log("openpaymentsheet", response);

#

It is set to run on a buttonClick and there is nothing that executes before this line

wanton aspen
tepid field
#

okay i can check

#

but if the backend code is missing the stripe key, will it throw the same error on fronend call of presentPaymentSheet()?

#

So far i see, the backend piece returning correct response.

wanton aspen
#

Ah gotcha, so you're getting initialization and it's during the present step that error is being raised. Hm, not sure why a secret key would be needed there, thinking through this a bit more.

tepid field
#

const response = await presentPaymentSheet(); console.log("openpaymentsheet", response);

#

this is the code that i am executing on checkout button click after getting all the values from backend piece.

wanton aspen
#

Hm, I'm not seeing that error message in our React Native library, so I think that's coming directly from our API.

tepid field
#

ok

#

am trying to check the backend code

wanton aspen
#

Can you share the ID of an intent where you're seeing this behavior?

tepid field
#

this is the create-payment-intent webhook event:

#

i see :> "status": "requires_payment_method"

tame novaBOT
wanton aspen
#

Thank you. Yup, I see your backend seems to consistently create Customer, Ephemeral Keys, and Payment Intents.

gusty tinsel
#

Hello! I'm taking over and catching up...

#

@tepid field You still around?

tepid field
#

yes

#

i am setting exactly like that

gusty tinsel
#

Is the publishable key hard-coded or is it a variable? If it's a variable can you log it to confirm it contains the key you expect?

tepid field
#

it's being passed through an env variable

#

also, just confirmed this is not an issue from backed at all.

#

I think it is something around publishable key

#

but i have not changed anything recently on frontend, checking what's going wrong

gusty tinsel
#

Yep, I agree, it's probably the env variable not containing the key.

#

Or maybe it's missing a character or something due to a bad copy or paste?

tepid field
#

it worked when i hardcoded the key