#mrbenhowl_react-address-elements

1 messages ยท Page 1 of 1 (latest)

whole horizonBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1425626137111036036

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

sonic sedge
#

Hi ๐Ÿ‘‹

Both are React wrappers around the Stripe Address Element. They just create it with different types.

#

So this advise still stands. If you want both Shipping and Billing address info, I recommend you use the <ShippingAddressElement> component and then use the Payment Element to collect Billing Address information. The only sub-optimal situation there is the Payment Element only collects as much billing address info as is required for each Payment Method Type

whole horizonBOT
#

mrbenhowl_react-address-elements

spice wadi
#

Thanks @sonic sedge . What I have so far is the <PaymentElement/> and a <ShippingAddressElement/> and testing it locally I saw a checkbox along the lines of "is this the same as the billing address?" and if you unchecked it, it just revealed a country field. My first thoughts was "what if the payment provider requires more than just a country field", but I think what you are saying is, if the payment type selected requires more of the billing address, then more fields would be displayed to capture this (which I haven't seen yet) - is this a valid assumption?

strong monolith
#

hello! I'm taking over from snufkin,

if the payment type selected requires more of the billing address, then more fields would be displayed to capture this (which I haven't seen yet) - is this a valid assumption?

yes, that's correct. I'll still recommend testing out all the PaymentMethods that you intend to support to make sure things work as what you expected

spice wadi
#

Thanks @strong monolith . Do you know which Payment Method would show more than just the Country field?

strong monolith
#

gimme a while to see if I can find one ๐Ÿ‘€

spice wadi
#

Amazing, thank you ๐Ÿ™‚

strong monolith