#mkoenke

1 messages · Page 1 of 1 (latest)

ember condorBOT
boreal narwhal
#

Currently the PaymentElement is not compatible with a flow like this since it requires the PaymentIntent to be created BEFORE the element is displayed - we know which payment methods to display because the currency (and all the other information we need) is set on the Payment Intent (which is why it's required)

lyric minnow
#

Gotcha, so with using the payment element, there is no way to determine the currency at the time the card information is entered. We would need to know that before rendering the PaymentElement. Is there a way to update this? For example: Say we determine the currency is EUR based off of perhaps the IP address, but then the card entered is a USD card - would we have to just move ahead with charging the USD card in EUR? or is there a way to update?

boreal narwhal
#

There isn't really a way for you to do this today - the issue is that you'd need the PaymetnMethod to be created first (in order to see what kind of currency card it's for), but the PaymentMethod is created at the same time as the PaymentIntent being confirmed

#

So there's no hook foryou to be able to update the PI currency to what you want

lyric minnow
#

Darn... okay thanks for the information! Does Stripe have recommendations on the best way to determine currency before the card information is available?

#

Also, would we be able to process renewal payments completely server-side? Would we want to just send the payment method in the PaymentIntent.create call, the way we are doing it now, instead of the two step process?

boreal narwhal
#

We don't have any specific recommendations on determing currency between the card information is available (really there's a lot of different ways to do this, and it gets complicated when you have to consider currency conversion and things like that)

#

For renewal payments, yes, you'd include the paymentmethod when you create the PaymetnIntent with confirm: true