#valerio-sevilla_api

1 messages ยท Page 1 of 1 (latest)

slow ledgeBOT
#

๐Ÿ‘‹ 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.

vivid crown
#

๐Ÿ‘‹ 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

normal sleet
#

Thanks for your reply. Our intention is to create the PaymentIntent afterwards.

vivid crown
#

for the deferred flow it's not possible to know ahead of time

normal sleet
#

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?

vivid crown
#

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

slow ledgeBOT
normal sleet
vivid crown
#

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

normal sleet
#

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

primal shadow
#

the IP address of the browser visiting the payment page.

normal sleet
#

A little different question now... is there any way to disable credit cards in the PaymentElement?

primal shadow
#

sure, you can. For instance pass a PaymentIntent where you have payment_method_types set to an array that does not contain "card".

slow ledgeBOT