#anton-dekhtyar_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/1266134793674952734
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- anton-dekhtyar_api, 8 hours ago, 16 messages
Yes, I wanted to clarify, maybe it would be better for me to use CardElement in this case?
Can you help&
Hello, apologies meant to reply that I am looking in to this. I don't think you can configure card brands that are available for the element itself but there are flows where you could check the card brand yourself and error out if the card brand is not Amex
Yeah it looks like this isn't something that is configurble with Elements. You can do this with the card element but we have a more modern flow with the payment element that will work here as well https://docs.stripe.com/payments/build-a-two-step-confirmation
Basically after step 3 you have an object called a confirmation token that has the card info on it. Your server and client can check the card brand before proceeding to actually confirm the payment intent
I understand correctly that your proposed solution is to display icons on all cards since I can't close them, but when the user enters Visa, give him an error?
Correct, unfortunately there isn't a way to prevent the brand icons from showing up as far as I am aware
๐ thnks.
why not use card validation at the front. Check to see if this is amex before submitting and give an error. why use token and server
Unfortunately I am not sure on the reasoning behind that design decision. If you reach out to our support team you can put in a feature request for this, I can definitely see how it would be useful