#hugo_api
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/1418377996741644390
๐ 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.
- hugo_api, 2 days ago, 24 messages
If I was using ApplePay directly it seems that I need to pass requiredBillingContactFields as an empty array, I don't see how to specify it using Stripe's PaymentElement
Can you try if setting fields.billingDetails.address to never will work for this case? https://docs.stripe.com/js/elements_object/create_payment_element#payment_element_create-options-fields-billingDetails-address
I've tried a few things with those properties, this is the latest attempt:
fields: { billingDetails: 'never', }, defaultValues: { billingDetails: { name: 'Hugo Cueva', email: 'hugo@example.com', address: { line1: '123 Main St', line2: 'Apt 4B', city: 'New York', // eslint-disable-next-line @typescript-eslint/naming-convention postal_code: '10001', state: 'NY', country: 'US', }, }, },
(That information is made up so no problem sharing )
It does not seem to work
I'm seeing this on stripe-js :
` /**
- By default, the browser's payment interface only asks the customer for actual payment information.
- A customer name can be collected by setting this option to
true. - This collected name will appears in the
PaymentRequestEventobject. - We highly recommend you collect at least one of name, email, or phone as this also results in collection of billing address for Apple Pay.
- The billing address can be used to perform address verification and block fraudulent payments.
- For all other payment methods, the billing address is automatically collected when available.
*/
requestPayerName?: boolean;
/**
- See the
requestPayerNameoption.
*/
requestPayerPhone?: boolean;
/**
- See the
requestPayerNameoption.
*/
requestPayerEmail?: boolean;`
Can't find how to pass that through the PaymentElement
The one you're sharing is for Payment Request Button, which is a legacy integration.
For Payment Element, the customisation on the wallet payment method is limited.
Checking if there is any way disable billing address collection for Apple Pay in Payment Element
Yeah I know it's not for the same, I'm looking on a way to disable billing address collection
Thanks for looking ๐
Could this be related to a Radar rule?
This is not due to Radar
Ok ๐
I'm also trying passing billing details on the call to createConfirmationToken but doesn't seem to be working for that either:
const { error, confirmationToken } = await stripe.createConfirmationToken({ elements, params: { /* eslint-disable @typescript-eslint/naming-convention */ return_url: returnUrl, payment_method_data: { billing_details: { name: 'Hugo Cueva', email: 'hugo.cueva@example.com', phone: '123-456-7890', address: { line1: '123 Main St', line2: 'Apt 4B', city: 'New York', state: 'NY', postal_code: '10001', country: 'US', }, }, }, /* eslint-enable @typescript-eslint/naming-convention */ }, });
Hi @soft gale I'm taking over this thread
It seems there's no option to disable billing address collection in Apple Pay using a PaymentElement. Can I suggest you using ExpressCheckoutElement instead?
I don't think that's an option for us right now, is it possible to disable it using ExpressCheckoutElement ?
(In case we can consider that as an option)
I see, I'll look into the feasibility of replacing PaymentElement with ExpressCheckoutElement
Thanks for looking into this both of you.
No problem. Btw you can use PaymentElement and ExpressCheckoutELement together
Can you elaborate on that?
So paymentElement can provide other payment options (i.e., ACH Direct Debit, card) whereas ExpressCheckoutElement can provide wallet options.
We'd need a way for the customer to switch between those (us adding a way to switch between wallets and not wallets and showing either PaymentElement or ExpressCheckoutELement , right?)
oh nevermind, I misunderstood ExpressCheckoutELement , I'll see if that's an option, thank you!