#mekhami-payment_element
1 messages · Page 1 of 1 (latest)
If you're creating an entirely new Payment Intent then I don't think there's any way around doing the full re-render. The only way around this would be to update the PaymentIntent that was already created
I know you're not involved with this, but my example was https://donate.wck.org/give/417669/#!/donation/checkout
If you look at that one, they render the stripe card element and then the user can go back and change the amount without that element re-rendering. Is this an implementation detail of their application?
maybe they are updating the payment intent rather than creating a new one...
This is because card element and payment element have some fundamental differences - the card element doesn't require a payment intent in order to be rendered, while the payment element does
with this configuration, if i were to update the payment intent, would i be able to pass the updated payment intent to the stripe elements api and not re-render the form?
^^ are you still wanting to use the card element or the payment element?
the payment element
Gotcha - so yes, if you were to update the existing element you wouldn't need to re-pass it or anything. When you go to complete/confirm the payment, Stripe already knows the PI has been updated and it'll confirm the updated payment intent. The big downside with this is that some payment method types (like google pay and apple pay) surface the amount in the UI, so if you don't re-render the Payment Element they'll show the older values