#majks_code
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/1248228007735201814
đ Have more to share? Add 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.
- majks_code, 2 days ago, 14 messages
- majks_docs, 3 days ago, 2 messages
hi! we don't recommend removing it because it's important as it allows us to know if we need to collect a postal/ZIP code and what format, which helps with fraud.
if you already know the customer's billing address country, you can pass it via defaultValues https://docs.stripe.com/js/elements_object/create_payment_element#payment_element_create-options-defaultValues
Why is it needed?
We know all users, because we are doing Know Your Customer on registration and also have some fraud detection monitors.
If we decided to remove it how we could do it?
collecting a postal code is super important for preventing declines and fraud(and if you're on IC pricing, it costs more if you don't pass one, for context), and asking for the country is the best way to know when and in what format the payment form needs to ask for a postal code. If you are confident you have that information from the customer's billing address, you can use defaultValues to pass all that in , and/or you can use fields to mark address:never https://docs.stripe.com/js/elements_object/create_payment_element#payment_element_create-options-fields , but you will get errors if you don't then provide an address when confirming the Intent.
yes
Okay thenks for your informations
I have tried like this return this.stripe.elements({ // https://docs.stripe.com/elements/appearance-api appearance: {}, locale: this.$i18n.locale || 'en', mode: 'payment', fields: { billingDetails: { phone: 'never', address: 'never' } }, payment_method_types: ['card'], currency: this.fiatCurrency.toLowerCase(), amount: 100, // Default data to render element, overridden by backend }) but country field it is still showing on frontend
You may need to be more specific: fields[billingDetails][address][country]: 'never'
[also it's an argument to elements.create("payment"), not stripe.elements() constructor(you should see a warning in the console telling you you're passing a parameter that is ignored since it's in the wrong place)]
Oh yeah, good spot
You'll need to pass the field on confirmation: https://docs.stripe.com/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams-payment_method_data-billing_details
OK, I think the same will still apply, but a different param: https://docs.stripe.com/js/confirmation_tokens/create_confirmation_token#create_confirmation_token-options-params-payment_method_data-billing_details