#mrbenhowl_react-address-elements
1 messages ยท Page 1 of 1 (latest)
๐ 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.
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
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?
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
Thanks @strong monolith . Do you know which Payment Method would show more than just the Country field?
gimme a while to see if I can find one ๐
Amazing, thank you ๐
the only one that comes to mind currently is SEPA debit : https://docs.stripe.com/payments/sepa-debit/accept-a-payment?web-or-mobile=web&payment-ui=elements#web-submit-payment
IBANs with the country codes AD, PF, TF, GI, GB, GG, VA, IM, JE, MC, NC, BL, PM, SM, CH, and WF require the country and line1 properties of the billing_details.address property.