#wjq8g6

1 messages ยท Page 1 of 1 (latest)

quartz trellisBOT
iron stone
#

Hi ๐Ÿ‘‹

What do you mean "StripePaymentForm"? What platform is this on? (Mobile, Web,, etc.)

runic totem
iron stone
#

Ah, Payment Element. Thanks for clarifying

runic totem
#

Oh we aren't using that function at the moment, we are updating the paymentIntent via stripe.paymentIntents.update. Should we use that update function instead? Looking at the doc, I'm not sure where we would include the amount update in the options argument

iron stone
#

Hold on, I think you mistake how this works

#

Using the function you mentioned updates the Payment Intent on your server and with Stripe

#

but the Payment Element doesn't know it

#

Rung the JavaScript function I linked you to is how you let the Payment Element know about the updates to the Payment Intent

runic totem
#

Gotcha, I'm looking at the parameters of that function you linked, but the fields seems to be related to business name, customer details, and terms. How would I structure that element.update call to update the payment element's payment intent?

iron stone
#

Wait sorry, there are multiple update functions and I grabbed the wrong one ๐Ÿคฆโ€โ™‚๏ธ

#

Because you initialize elements with the clientSecret so that's when the information about the Payment Intent is provided. This function updates the elements with any new data from the Payment Intent

runic totem
#

Ahh I see, that makes sense. Will try it out, thanks!

#

Oh actually, quick question, is there an example for fetching the element in React? Right now we just add <PaymentElement/> directly to our render function

outer swallow
#

๐Ÿ‘‹ Taking over this thread, catching up now

runic totem
#

Gotcha, so we would use the useElements hook right?

outer swallow
#

Yes! the elements from useElements hook

runic totem
#

Cool, thanks for the help!

outer swallow
#

No problem! Happy to help ๐Ÿ™‚