#pathfinder-paymentelement
1 messages · Page 1 of 1 (latest)
When you say "I need to call payment Intent every time I change the payment amount" are you asking whether you need to create a new payment intent?
Thats correct. Since client_secret is required in the rendering of the element.
Before all that was required to render the element was pub key, that way all I would do was call the payment intent method from the server when I was finalizing the payment.
Gotcha - so I'd say no, you don't need to create a whole new Payment Intent every time you need to update the amount. As an example, for the basic case of card payments if you initialized the Payment Element with pi_123 and then updated the amount for pi_123 in a separate request, when you go to confirm the Payment Intent with the element it'll still confirm it for the updated amount
Does that make sense?
I see, there is a api method for stripe.paymentIntents.update(), this is where I would update the amount upon finalizing payment.
yup!
Thank you