#bilalahmer
1 messages ยท Page 1 of 1 (latest)
Hi
You can set billingDetails.address: never when creating the Element:
https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-fields-billingDetails
const options = { clientSecret: this.intentSecret, billingDetails: { address: 'never' }, appearance: {/*...*/ }, }; this.elements = this.stripe.elements(options); const paymentElement = this.elements.create('payment'); paymentElement.mount('#payment-element');
Its still showing me the country.
Let me do a quick test...
Sure.
It's under field, you need to pass fields.billingDetails.address: never .
const paymentElement = elements.create("payment", {
fields: {
billingDetails: {
address: 'never'
}
}
});
Nope
Because getting this
You specified "never" for fields.billing_details.address when creating the payment Element, but did not pass confirmParams.payment_method_data.billing_details.address.country when calling stripe.confirmPayment(). If you opt out of collecting data via the payment Element using the fields option, the data must be passed in when calling stripe.confirmPayment()."
But yes you need to pass a default value instead.
๐
I though you meant to pass fields.billingDetails.address: never