#manuborches
1 messages · Page 1 of 1 (latest)
Hi there!
The Payment Element only collect the billing address if the selected payment method requires it. So it won't be always collected.
If you want to collect it all the time, you should use the Address Element: https://stripe.com/docs/elements/address-element
The address element collects that info for shipping. But if the user unselect the option 'billing address is same as shipping address' then Stripe asks for billing country, but not billing direction. How can I collect address is this case?
can you share a screenshot of this, where the address element doesn't ask for the address?
Also can you share your code?
On your second screenshot I do see the address, so what is the issue?
Sorry the first screen is related to the code
The second screen is what I want to have in my own implementation. That is from the checkout pre design approach
Another code but no prob with that. Now I'm trying the same on my own
Do you have a public URL where I can see this?
Yes give me a moment to deploy I'll let you know
Thanks!
rick and morty app
There we go
You'll need to add some product to cart for the stripe form to be displayed
Thanks a lot! give me a few minutes to look into this.
Thanks for the link. I'm still not quite finding why the full address fields aren't appearing. Reaching out to our other colleagues to help look in to this.
Okay thank you
Hey @inland crystal huge apologies on the long delay here
So it looks like what is happening is that those country and postal code fields that are showing up are the billing info
When that box is unchecked, the address form under the card info is the shipping information, and the fields that get added are for billing
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.
https://stripe.com/docs/elements/address-element?platform=web#shipping-mode
So then the implementation is okay?
I dont know why I can ask for billing address in checkout session but not in my integration
Also in the checkout session there are Shipping Address and Billing Address like two different sections with title. I don't have those titles in my integration
Hello 👋
Taking over as Pompey needs to step away
Hello
I dont know why I can ask for billing address in checkout session but not in my integration
How exactly does your integration function? Are you using PaymentElement for this?
Yes PaymentElement
And I'm passing the options object
My code is in this thread there is a screen
The PaymentElement only collects billing address for payment methods that require it to process a transaction successfully. So It won't automatically ask for billing address for all the payment methods. Additionally, currently there isn't a way to force PaymentElement to collect that information.
So either you'd use your own form to collect this information and then pass it in with confirmParams OR use Address ELements.
I think I prefer to use Address ELement
I already have one but for shipping address
It would be okay to have another Address Element for billing address?
What should I do from my end for Stripe to differentiate both billing and shipping address?
I believe you'd change the mode for the Address Element
https://stripe.com/docs/elements/address-element/collect-addresses?platform=web#add-the-address-element-component