#mhanzla80-paymentSheet-error

1 messages ยท Page 1 of 1 (latest)

tired gale
#

Hello ๐Ÿ‘‹
Let's chat here

fallow sierra
#

sure

tired gale
#

Can you share the code that you're using for this?

fallow sierra
#

should i upload the file or screenshot ?

#

i am using the firebase functions to deploy Node.js code and getting response on flutter frontend

tired gale
#

either is fine
You can copy paste the code as well

fallow sierra
#

i am getting correct response from the function but in init payment sheet getting this error

tired gale
#

can you print out the clientSecret before calling the initPaymentSheet function?
Basically, compare the secret that you get from firebase and the one that you're passing in

fallow sierra
#

yes sure

#

yes both are same keys

tired gale
#

are you creating the PaymentIntent on/for a connected account?

#

ah yeah from the code looks like you are

fallow sierra
#

yes

tired gale
#

How are you initializing your SDK?
I feel like its missing the connected account ID while attempting to initiate a PaymentSheet for it

fallow sierra
tired gale
#

I'm not sure what it looks like in flutter (since we don't officially support it) but I believe you'd need to pass in the connected account ID somewhere when initializing
as currently, its looking for the PaymentIntent on the platform account

#

where it obviously doesn't exist

fallow sierra
#

yes i got the error

#

i need to initialize the connected account id in the initializer.

#

fixed it. thanks @tired gale