#qzai.
1 messages · Page 1 of 1 (latest)
This is possible by setting fields.billingDetails.country to never under payment element options: https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-fields-billingDetails-address-country
Alternatively, entire fields.billingDetails can be set to never to disable any billing address information to be collected including country code
How to hide country information
You may refer to the above reply on hiding country information
ok i had resolve
thanks
You specified "never" for fields.billing_details.address.country 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().
what should I do
const paymentElementOptions = {
layout: "tabs",
fields:{
billingDetails:{
address:{
country:'never'
}
}
},
paymentMethodTypes: ['google_pay','apple_pay']
};
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().
Where did you see this message from?
when i use strip,confirmPayment()
Can you share the request ID (req_xxx) which you faced this error? Here’s how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
i had resolve it
Awsome! Great to hear that the issue has been resolved