#anthony_code

1 messages ¡ Page 1 of 1 (latest)

oblique bladeBOT
#

👋 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/1357434508789547179

📝 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.

hidden umbra
#

Good question, looking in to this and will get back with what I can find

#

Unfortunately I am not finding anything pre-built that would help you here. Our card element does have an event that triggers when the card number is complete, but you can't get the BIN or even provided postal code from that. The best workaround that I can think of would be to tell the card element to not collect the postal code itself, collect that via your own input, and display this message if the provided postal code is from India
https://docs.stripe.com/js/elements_object/create_element?type=card#elements_create-options-hidePostalCode

bitter cloud
#

thanks for confirming, appreciate your help!

hidden umbra
bitter cloud
#

i noticed that the credit card form sometimes asks for zip/postal code, and sometimes doesn't. does it ask for zip/postal code for indian credit cards, and in general, how can i better understand when it asks for zip/postal code vs when it doesn't?

hidden umbra
#

Good question, I am not sure on that. A good way to ensure that you always collect it is to turn the postal code field off and add your own input. I will see if I can find info on when we generally show/don't show it though

bitter cloud
#

thanks

hidden umbra
#

I'm not finding much documented on when the card element decides to ask for postal code. Any which way, if you do want to retrieve this consistently, I think that workaround with hiding it is the only way to, if you are seeing that field disappear

bitter cloud
#

sorry to keep this open, i have a question about an alternative solution. the high-level problem is that our product team wants to require every customer to opt into autorenew before purchasing, and are requiring all customers to click a checkbox first. aside from this being perhaps a weird customer experience, the other issue is the indian credit card one as mentioned. one potential solution is the one mentioned, which is to add copy in the case of an indian credit card, but that isn't fully supported by the stripe card element as discussed above. would you recommend any other solution to this problem?

hidden umbra
#

The only other thing that I am thinking of is inspecting the country property on the payment method object after it has been created. You could have your page create a PM instead of immediately confirming an intent, check the country code, and display a message that they need to acknowledge before proceeding with the payment.
https://docs.stripe.com/js/payment_methods/create_payment_method
The Payment Element has a similar flow where you can inspect payment method details early, and I think it always asks for card country
https://docs.stripe.com/payments/build-a-two-step-confirmation#create-ct
Alternatively you can check the country property after the first payment has been made and make this message part of the success page