#valerio-sevilla_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1262698655274631264
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
๐ happy to help
if you create the PaymentIntent first you have the list of valid payment_method_types on it that you can check
but this list is not the final one since there are other restrictions based on the customer location that won't be applied until the PaymentElement is rendered
Thanks for your reply. Our intention is to create the PaymentIntent afterwards.
for the deferred flow it's not possible to know ahead of time
Considering this conversation it seems that it is not possible to know it ahead of time even when creating the PaymentIntent first ๐ฆ . Isn't there any way to programmatically get the list of payment methods that the PaymentElement will show? Or at least, know if it will be empty?
Considering this conversation it seems that it is not possible to know it ahead of time even when creating the PaymentIntent first ๐ฆ
how so?
Isn't there any way to programmatically get the list of payment methods that the PaymentElement will show? Or at least, know if it will be empty?
not really
Because even with the PaymentIntent we cannot get the final list, as you said, right?
you would get the list but some of these payment method types might not be available for the customer so they would get filtered based on the customer location
Where is that customer location taken from? I mean, I haven't seen it in the list of options supported by the PaymentIntent, the Elements provider or the PaymentElement
the IP address of the browser visiting the payment page.
A little different question now... is there any way to disable credit cards in the PaymentElement?
sure, you can. For instance pass a PaymentIntent where you have payment_method_types set to an array that does not contain "card".
or create a PaymentMethodConfiguration pmc_xxx that doesn't contain card, and use that. https://docs.stripe.com/payments/payment-method-configurations?dashboard-or-api=api