#jack_lim4

1 messages ยท Page 1 of 1 (latest)

slender etherBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

turbid sigil
#

Hey there

hoary sundial
#

Hi there

turbid sigil
hoary sundial
#

With the requirement that I have, is my only option to build my own UI?

turbid sigil
#

If you want to support PaymentMethods that aren't Stripe-supported in the same UI, then yes.

hoary sundial
#

I have a thought - not sure if this is an anti-pattern

  1. enable both credit/debit card and ACH payment method on the dashboard
  2. when user choose a payment method e.g. credit/debit card, redirect user to a new screen with PaymentElement rendered, but filter it to just credit/debit card when creating the PaymentIntent
  3. likewise for the ACH payment method, filter it to just ACH when creating the PaymentIntent

Would this hide the other payment methods? And is it bad to have multiple PaymentElements on the site? (Althought one at a time)

turbid sigil
#

That is a fine way to do it

#

Really you wouldn't want to use the payment methods in the Dashboard at all here

#

You would want to explicitly set payment_method_types when you create your PaymentIntent

#

Based on what the customer selects as their method of payment

slender etherBOT
hoary sundial
#

I see, so to reiterate

  1. I can have a custom UI payment method option selection screen
  2. When user have chosen 1 payment method supported by Stripe, create a PaymentIntent with payment_method_types explicitly set to the selected payment method so that it appears that there are no other payment option on the UI
  3. When user have chosen 1 payment method NOT supported by Stripe, starts the respective flow that is different from Stripe
turbid sigil
#

Yep

hoary sundial
#

Alright got it

I still need to enable both the payment methods that I want from the Dashboard, is this right?

Or I don't have to bother with the Dashboard at all and simply set it in the PaymentIntent payment_method_types?

turbid sigil
#

You can ignore the Dashboard if you are specifying payment_method_types

hoary sundial
#

Ah I see, thank you so much for clarifying

I believe this is the approach that requires least effort while able to support my use-case

hoary sundial
#

Sorry I have one more question - I just realized the issue with this approach is I will have a lot of PaymentIntents created for the same invoice if the user keep on switching between the Stripe payment methods.

So in order to reuse PaymentIntent, I think I will have to update the payment_method_types depending on what the payment methods user selects now.

Is there a problem if I update the PaymentIntent payment_method_types say after the user have attempted a payment but not confirmed to be successful yet? (Thinking ACH)

reef bobcat
hoary sundial
#

Alright I see

#

Hmm on second thought, alternatively I could just create 1 PaymentIntent for each payment method type and reuse the PaymentIntent within the same payment method type

reef bobcat
#

However, the one way to know 100% would be to run a quick test ๐Ÿ˜‰

hoary sundial
#

Yup, I guess I will have to do that to be 100% sure