#anisus
1 messages · Page 1 of 1 (latest)
Hi
When creating the Payment Element, try setting postalCode to auto
https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-fields-billingDetails-address-postalCode
Otherwise, you can collect billing address using Address Element:
https://stripe.com/docs/elements/address-element
So that you are sure to collect all the required fields you need
Thanks for the answer.
I have tried adding postalCode like this:
elements.create('payment', {
fields: {
billingDetails: {
address: {
country: 'auto',
postalCode: 'auto',
},
},
},
})
But no avail. I guess I can explore the address element more.
Yes that's the next step to explore. Happy to help!