#Nick Ortega
1 messages · Page 1 of 1 (latest)
You would need to fetch() a server-side endpoint that makes an API call to update the Payment Intent amount, then (once it was updated) make a client-side update call to update the Payment Element: https://stripe.com/docs/js/elements_object/update_payment_element
I have a fetch server side endpoint that makes the the call to update the amount but perhaps I am lacking the update call to update the Payment Element
this link is what I need to call AFTER it is updated?
would I use elements.update() or elements.fetchUpdates() ? Because it mentions not to use a certain one
this link is what I need to call AFTER it is updated?
Correct. It essentially merges changes made to the PI into the Payment Element
Ah, sorry, this one: https://stripe.com/docs/js/elements_object/fetch_updates
Fetch updates is correct
Even tho I hardcoded the amount when creating the payment intent obj, I can still change the amount using both the fetch server side endpoint and elements.fetchUpdates? correct?
I would imagine so, since the hard-coding presumably occurs on a server-side function that you wouldn't touch
okay i will work on this and ask again if any questions come up. Thank you for your help !
Sure thing!