#josh_paymentelement-applepay

1 messages Ā· Page 1 of 1 (latest)

pliant hawkBOT
#

šŸ‘‹ 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/1489027419032522843

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

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

vernal otter
#

josh_paymentelement-applepay

#

Can you confirm your exact integration? Like how do you initialize PaymentElement?

lunar marsh
#

Yup! fields: { billingDetails: { address: 'never' } },

#

Apple Pay doesn't require fields it shouldn't error out when we select Apply Pay and call await stripe.createConfirmationToken

#

Or as another option can I pull the billingDetails from an event similar to how express pay works?

vernal otter
#

Having a look but will take some time

vernal otter
#

Okay sorry took a while to reproduce. I forgot I was forcing the country on confirmationToken creation in the first place šŸ¤¦ā€ā™‚ļø

#

So really this is expected. If you tell us "never collect country" then we expect you to collect it first and pass it.

#

My guess is that the best approach here would be to split ApplePay/GooglePay out of PaymentElement using ExpressCheckoutElement instead

lunar marsh
#

Bummer

#

Yeah we have ExpressCheckout in Chrome but the radio buttons tested better in Safari / FireFox without express pay.

#

Does if_required hide everything in the card section? I can test real quick too.

vernal otter
#

oh wow you're righjt

#

I completely forgot we shipped that weird address is either a hash or an enum and that does work

lunar marsh
#

Ok let me try

#

How does if_required work exactly?

#

I mean where does it check in the configuration when I set address: 'if_required'?

vernal otter
#

it's when you initialize Elements. Not sure I understand the question though

lunar marsh
#

Yeah this is looking really good

#

Specify if_required to only collect the minimum billing address fields required to complete the payment. You can omit and hide optional address fields in the card form, such as country and postal code.

#

Let me test both ways

#

Thanks for the help I might disappear I think if_required might have solved it!