#Matt11
1 messages · Page 1 of 1 (latest)
If you're referring to Payment Element, this can be done with setting the fields.billingDetails.address.country to never during Payment Element creation.
ok thanks, and removing it is it something bad?
I mean there's the possibility that the payment goes wrong?
Hey! Taking over for my colleague. That depends on your needs and what payment methods are you using. You can remove it and depending on your future requirements you can add it back.
I just using cards for future usage off_session
I think you can remove the billingDetails so, try testing it and if you got some error due to this, I think you'll get explicit errors about this.
thanks! 🙏
Welcome!
I think is not working for my implementation because I creating the elements in this way:
const elements = stripe.elements(options);
and this one is not accepting the fields.billingDetails.address.country to never
You should like this:
const elements = stripe.elements({
appearance,
clientSecret,
});
paymentElement = elements.create("payment", {
fields:{
billingDetails:{
address:{
country: 'never'
}
}
}
});
That options need to be passed to create function and not elements function:
https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-fields-billingDetails-address-country
you're right! it works! thx!