#kevin_docs
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/1439913189302206595
๐ 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.
- kevin_code, 4 days ago, 5 messages
hey there! the Payment Element identifies the country based on the card number entered - setting the locale affects the language, but doesn't affect the country-specific validation
Oh okay but what are the conditions that pre-select the country at the time the user haven't entered any information about the credit card? ๐ค
Just running a quick test to confirm
Okay, waiting for your answer ๐
it's not possible to pre-select a country for the Payment Element, but this may not be relevant depending on what your ultimate goal is
it sounds like what you want is control over which address fields are collected in the Payment Element
the Payment Element is a bit different from our other Elements (Card, Address, etc) in that it only collects a postal code where Stripe's optimisations indicate its impactful for conversion, so it's not just dependent on the country
if your goal is to control which address fields are collected may be worth looking into using the Address Element so you can always collect the customer's full address on the checkout page: https://docs.stripe.com/payments/advanced/collect-addresses?payment-ui=elements
It was more my product manager that was asking why it was always "France" pre-selected, she wants to know why it's not "UK" when my domain name finish with .co.uk
Because a UK user in our website is less likely to have a french credit card
๐ Hi there! I'm taking over for my colleague. Let me catch up
The country initially shown in the Payment Element is based on the country associated with the IP address of the customer
Oh okay thank you ๐ I'll tell this to my product manager
Perfect, she's fine with that answer ๐
Great. Is there anything else we can help with?
Not for now, maybe later, thanks ๐
Alright, great! We'll be here ๐