#lewis_ece-paypal-billing-required

1 messages ยท Page 1 of 1 (latest)

proven aspenBOT
#

๐Ÿ‘‹ 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/1418002483250335966

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

tired vine
slim tapir
#

ah okay I see, would it be possible to load 2 separate elements?

1 - with the billingAddressRequired: true for google/apple
2 - without this option for paypal

tired vine
#

Not on the same page

#

Having duplicate elements can cause a lot of headache where StripeJS starts interacting with the wrong element

slim tapir
#

just to check is apple/google pay supposed to include the billing info as default? for some reason it didn't show up until I added that option

#

I thought the docs mentioned it is supposed to be enabled as default

tired vine
#

Not necessarily. I see Google Pay/Apple Pay without requiring billing info

#

By default, the Express Checkout Element collects the billing address

Yes, you are correct about the documentation

#

But in our PayPal doc, we expressely point out that you should use the following to enable PayPal

elements.create('expressCheckout', {
  phoneNumberRequired: false,
  billingAddressRequired: false,
  shippingAddressRequired: false, // Only supported for one-off payments
});
slim tapir
#

ahh okay I see

tired vine
#

You might be able to update on the click event though.

slim tapir
#

so don't include the option, then onclick add the option to google/apple?

tired vine
#

I'm trying to test it out but I don't have a Payment methods that are disabled when billing address is required

slim tapir
#

ah okay I see, I'll have a go at testing it now

#

thanks for the help I appreciate it!

tired vine
#

Blast okay that's not an option

#
IntegrationError: billingAddressRequired, emailRequired cannot be updated while the payment sheet is open.
slim tapir
#

ahh thats annoying lol

tired vine
#

Yeah, but I guess it makes sense. They don't want the request changing while the Customer is interacting with the modal

slim tapir
#

is there no way to change the individual options? like per payment method

tired vine
#

No but I can flag that as a feature request

#

I think we would need to do the same thing here

slim tapir
#

do you know if there is any other options similar to loading 2 elements on the same page?

#

like loading express checkout for google/apple then a separate payment element for paypal

tired vine
#

Are you only displaying digital wallets using the Express Checkout Element? Or do you also have the Payment Element?

slim tapir
#

ideally I wanted it all to use the express checkout element

tired vine
#

You could go that route. Use the Payment Element for one of the types and Express Checkout Element for the others

#

We do support using multiple different elements on the same page

#

Just not two versions of the same element type

slim tapir
#

oh perfect that might be the way I'll have to do it then

#

another quick question, does paypal always include a billing address in the charge object?

tired vine
#

I think that all depends on what the Customer has saved with PayPal

slim tapir
tired vine
#

I have found some examples where we got nothing for billing address

#

load is fired when the element is loaded so that would just hide PayPal before your customer can select it

slim tapir
slim tapir
tired vine
#

That would be up to you

slim tapir
#

last question I think lol, is there any option within stripe to make a billing address required with paypal?

tired vine
#

Nope

#

That's not something PayPal's integration supports currently

slim tapir
#

ah okay

#

thank you for the help!

tired vine
#

Happy to shed what ๐Ÿ’ก I can ๐Ÿ™‚