#manuborches-elements-collect-address
1 messages · Page 1 of 1 (latest)
Hi 👋 the Payment Element collects address information based on whether it is required for the selected type of payment method.
I think you our Address Element may be the best fit for what you're looking for:
https://stripe.com/docs/elements/address-element?platform=web#billing-mode
https://stripe.com/docs/elements/address-element/collect-addresses?platform=web
manuborches-elements-collect-address
Sorry the right question was
How can I enable billing address collection in address element?
I have already an address element in shipping mode. But if the user unselects shipping address is same as billing, I would like to collect billing address
Hi there! Stepping in for my colleague who needs to log off
I believe you'll need to create a separate form/input fields for their billing details, then pass these along when confirming the PaymentIntent: https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams
In case I implement it that way then I will need to remove the checkbox 'billing address is same as shipping'
Also if I create separate form I will not have Stripe validation and autocomplete as in shipping address collection
Yep, that's right, unfortunately
We kind of call this out here: https://stripe.com/docs/elements/address-element?platform=web#use-address-element-with-other-elements
If the user opts not to use the same address for shipping and billing, the shipping details will not be used as billing details in the PaymentIntent or SetupIntent and the user will manually enter only the required billing details.
So, if you need to collect more than the required billing details for a given payment method type, this will need to be done outside of Elements