#sushbhat

1 messages ยท Page 1 of 1 (latest)

glacial cairnBOT
gentle vector
frigid urchin
#

ok, but how do I update the paymentintent details from client side?

#

our client just has clientsecret with it

gentle vector
frigid urchin
#

backend needs paymentintent id right to update payment intent object details? but client doesn't have paymentintent so wondering how can backend know which paymentintentid to update

gentle vector
#

the text before _secret_ in the client secret should be the PaymentIntent ID

frigid urchin
#

oh I see..

gentle vector
#

An alternative would be to return the whole PaymentIntent object to client-side when you create it and store the PaymentIntent ID in your local state or a variable

frigid urchin
#

and after elements.fetchUpdate will client secret change?

gentle vector
#

It shouldn't, no.

frigid urchin
#

ok, one more thing how does elements.fetchUpdate() know which paymentintent changes to fetch on client side? does it internally look up based on client secret?

gentle vector
#

It will look it up based on the secret, yes.

frigid urchin
#

thanks!

gentle vector
#

๐Ÿ‘