#martin_code
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/1284089690458165259
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi! right now that's not something we support in PaymentElement.
we do have plans to eventually make this "only accept certain cards" a first-class feature and there might be betas that help if you reach out to your contacts if you have any or ask in a support ticket
the other alternatives are to not use PaymentElement and use older/legacy components like CardNumberElement that don't have their own brand icon component, but that's not something I can recommend doing
Hello @shrewd meadow thank you for answering me. So if I understand correctly you are already working on this feature? Do you have ETA when it will be available?
no I do not
Ok. So at this moment I could just use https://docs.stripe.com/payments/build-a-two-step-confirmation to validate card brand on the backend? And maybe there is a way to hide icons in the card number input with some css settings?
there's no way to hide them when using the PaymentElement, no
if you want to block cards then yes the two-step deferred flow lets you inspect the PaymentMethod and show an error based on card.brand yep, that's one way to do this. But you can't customise the brands shown in the PaymentElement