#hickorydickorydock_code

1 messages · Page 1 of 1 (latest)

keen needleBOT
#

👋 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/1395394917223760000

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

tawny glen
#

Additional detail:

#

I have a page that loads the Stripe Link Authentication element, the Payment element, and the Address element.

When I am logged in to Stripe Link and I open my page where the Stripe Link Authentication element is embedded, I'm shown the Email associated with my Stripe Link account in the Link Authentication element and the option to "Use another email".

Even though there's only one email address shown in the Link Auth element, my email isn't pre-selected. If I select the email, it removes the "Use another email" option and prefills my card into the Payment element. That's good and expected, but what I'm hoping for is to be able to pre-select the email on page load so that that click isn't necessary.

After all, I'm already logged into Stripe Link and do not need to enter a one-time code in order to proceed, and there's only one email address available.

#

Here's an example screenshot -- when I load the page, notice that there's only one available email address, but it's not pre-selected. If I click it, I'm not asked for a one-time code (that's good) and it pre-fills my card details (also good). But I'd like to not require users to click that.

bitter cloud
#

Hi, are you asking if it's possible to just have that Link ☑️ ?

tawny glen
#

I think so, because if it's pre-selected, then their card is prefilled also, and they can complete the transaction more easily, especially since they're already logged in to Link

bitter cloud
#

Given that you were unable to while testing, I suspect not but let me confirm.

tawny glen
#

One thing that didn't fit in the character limit -- https://docs.stripe.com/payments/elements/link-authentication-element#prefill-customer-data suggests that: If you want to prefill additional customer data, add the defaultValues.billingDetails object to the Payment Element. This prefills a customer’s name, phone number, and shipping addresses. By prefilling as much of your customer’s information as possible, you simplify Link account creation and reuse.

Use the Link Authentication Element to integrate Link.

#

So I also tried using defaultValues on the Payment element too, like

#

// Create the payment element with the user's defaults
const paymentElement = window.stripeElements.create('payment', {
defaultValues: {
billingDetails: {
name: '{{ user.name }}',
phone: '{{ user.phones.mobile }}',
address: {
postal_code: '{{ user.postal }}',
country: '{{ user.country }}',
},
}
}
});

#

(Did that in combo with providing the defaultValues for the Link Auth element, not in lieu of)

bitter cloud
#

I suspect this is so end customers can make their own choice instead of having us pre-select. If someone were moving too quickly and used the pre-selected the option, I could see customers asking for a refund and then attempting to pay with the correct payment method type.

tawny glen
#

Understandable. If it's not possible to do this now, can I file this as a feature request?

bitter cloud
#

It does not appear that it possible, I will share your feedback with the product owning team. Thank you for this feedback

tawny glen
#

Thank you for your help today, appreciate it!