#anyakey_best-practices
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1257406366499344467
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
When you say removing CreditCards from payment methods what do you mean?
What are you trying to do specifically? What's your use-case?
We've switching them off in the Dashboard
And for some usecases we get an empty PaymentElement
We want this issue to be unnoticed by the user, e.g. know in advance that there won't be anythinh
Or maybe some callback to hide the container with PaymentElement
If you check payment_method_types on the PaymentIntent that you created, is that an empty array in this scenario?
We first collect data then create a PaymentIntent ๐ฆ
Ah so you set up elements without a payment intent and then get a blank payment element sometimes for certain configurations?
Yep
It's okay that it's blank, but we want to hide the whole container so no one notices it ๐
I think you can listen for the ready event and then check its list of available payment methods. Can you try this out on your test page and let me know if that works? https://docs.stripe.com/js/element/events/on_ready
Not quickly, I'm on call RN, but I'll try