#jack_lim4
1 messages ยท Page 1 of 1 (latest)
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.
Hey there
Hi there
You can build your own UI and use the Direct API route here to collect ACH without using Payment Element. See: https://stripe.com/docs/payments/ach-debit/accept-a-payment?platform=web&ui=API
With the requirement that I have, is my only option to build my own UI?
If you want to support PaymentMethods that aren't Stripe-supported in the same UI, then yes.
I have a thought - not sure if this is an anti-pattern
- enable both credit/debit card and ACH payment method on the dashboard
- 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
- 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)
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
I see, so to reiterate
- I can have a custom UI payment method option selection screen
- When user have chosen 1 payment method supported by Stripe, create a PaymentIntent with
payment_method_typesexplicitly set to the selected payment method so that it appears that there are no other payment option on the UI - When user have chosen 1 payment method NOT supported by Stripe, starts the respective flow that is different from Stripe
Yep
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?
You can ignore the Dashboard if you are specifying payment_method_types
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
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)
๐ bismark had to step away
I don't think there should be any issues with updating the payment method types really
https://stripe.com/docs/api/payment_intents/update#update_payment_intent-payment_method_types
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
However, the one way to know 100% would be to run a quick test ๐
Yup, I guess I will have to do that to be 100% sure