#anat_code

1 messages ยท Page 1 of 1 (latest)

hushed boneBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1257600593414062110

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

frigid onyx
#

Are you asking if you can conditionally hide the Link Authentication element?

whole reef
#

Yes, or in the case the user has a Link account (connected with email in default values), I would like to "hide" the card element. I would like an implementation "close" to the checkout experience

frigid onyx
#

Ok, I know react supports conditional rendering, but 'm not familiar with svelte so I don't know if this framework provides something similar, you might want to check its document.

whole reef
#

Mmh, the thing is I'm searching for the right hook to know if the user is connected or not. Maybe you have a sample ? (even in React no problem ๐Ÿ™‚)

frigid onyx
whole reef
#

mmh my bad I'm surely not clear. Svelte supports conditionnal rendering, the thing is how can I determine the "state" of the Link Authentication ?

frigid onyx
#

What state?

#

The state of its visibility?

whole reef
#

Here a screenshot, maybe it's gonna be more clear ๐Ÿ™‚
Here I created a Link Authentication element with a default value email, Stripe detected I have an account, so it shows me the PIN Code input.

frigid onyx
#

And in what condidtion do you want to hide it?

whole reef
#

Is it more clear ?

#

If a user has Link account based on his email, I would like to hide card element. If the user has no Link account, hide the Link authentication element.

frigid onyx
#

OK, so the real question here is how to retrieve information from Stripe that tell you whether the customer has a link account with the provided email, am I right?

whole reef
#

It could definitly be a way yes !

hushed boneBOT
pliant bluff
#

I am not sure something like this exists, unfortunately.

whole reef
#

Yes I read it haha. I'm wondering how the checkout product works then

#

Because on the checkout Link if automatically showed if user has an account and if not, it shows the credit card section

pliant bluff
#

It happens internally in Stripe, I don't think we make this capability available externally.

#

What do you see if the Link account doesn't exist?

whole reef
pliant bluff
#

Do you use both Express Checkout Element and Link Authentication Element?

whole reef
#

Yes !

pliant bluff
#

Why?

whole reef
#

Mmh in fact the Express Checkout is for Apple Pay and Google Pay. The Link green button is gonna be removed ๐Ÿ™‚

pliant bluff
#

It should display all available buttons.