#hugo_api

1 messages ยท Page 1 of 1 (latest)

shrewd monolithBOT
#

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

soft gale
#

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

kindred nexus
soft gale
#

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 PaymentRequestEvent object.
  • 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 requestPayerName option.
    */
    requestPayerPhone?: boolean;

/**

  • See the requestPayerName option.
    */
    requestPayerEmail?: boolean;`
#

Can't find how to pass that through the PaymentElement

kindred nexus
#

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

soft gale
#

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?

kindred nexus
#

This is not due to Radar

soft gale
#

Ok ๐Ÿ‘

shrewd monolithBOT
soft gale
#

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 */ }, });

daring rock
#

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?

soft gale
#

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)

daring rock
#

Yes it's possible to disable billing address collection in ExpressCheckoutElement

soft gale
#

I see, I'll look into the feasibility of replacing PaymentElement with ExpressCheckoutElement

Thanks for looking into this both of you.

daring rock
#

No problem. Btw you can use PaymentElement and ExpressCheckoutELement together

soft gale
#

Can you elaborate on that?

daring rock
#

So paymentElement can provide other payment options (i.e., ACH Direct Debit, card) whereas ExpressCheckoutElement can provide wallet options.

soft gale
#

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!

daring rock
#

No necessary, so basically you customer will see both ExpressCheckoutEleement and PaymentElement on the same page