#bilalahmer

1 messages ยท Page 1 of 1 (latest)

shut blazeBOT
lunar spade
shrewd timber
#

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.

lunar spade
#

Let me do a quick test...

shrewd timber
#

Sure.

lunar spade
#

It's under field, you need to pass fields.billingDetails.address: never .

const paymentElement = elements.create("payment", {
        fields: {
            billingDetails: {
                address: 'never'
            }
        }
    });
shrewd timber
#

Got it, Thank you ๐Ÿ™‚

#

Do I have to do the same in confirmParams also ?

shrewd timber
#

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()."

lunar spade
#

But yes you need to pass a default value instead.

lunar spade
#

I though you meant to pass fields.billingDetails.address: never