#sai_rez-element

1 messages · Page 1 of 1 (latest)

sonic grail
#

Hi!

now the client secret is required to be added to the Elements wrapper outside of the submit handler
That's true, you need to create the SetupIntent before showing the Payment Element
if a user failed payments for whatever reason, would they require a new setup intent to be created?
You can create a new use, or use the existing one. It's doesn't really matter.

ashen halo
#

So if a user fails SCA for e.g. and wants to try again it;s okay to use the same setupIntent?

sonic grail
#

Yes absolutely.

ashen halo
#

Also, with confirmCardSetup, we are passing in other details such as billing details. with confirmSetup how would we pass that information?

sonic grail
ashen halo
#

Thanks, and finally, last question is regarding the return_url param, we don't redirect with our existing setup, can we still keep a similar UX or does the PaymentElement redirect to a new tab?

sonic grail
#

when calling confirmSetup the return URL is mandatory. so users will be redirected when the payment succeeds.

ashen halo
#

During the payment process does the user get redirected somewhere?

slender needle
#

hi @ashen halo I'm taking over for @sonic grail

#

depending on the payment method user might get a popup for 3DS (in the case of cards) or to confirm their payment method (connecting to bank etc.)

#

other than that the user would not be redirected away from your page until the success

ashen halo
#

Thanks for that

#

One last question, is there a way to check that all fields have information, we've CardInputs we had handlers on the onChange prop which we could get values, is the same possible with PaymentElements?

slender needle
#

do you mean validation?

ashen halo
#

Yes, currently we only enable our submit button once all information is complete as we can get access to those values with CardInput, could the same be done with PaymentElement?

fiery scroll