#r-b_unexpected

1 messages ¡ Page 1 of 1 (latest)

midnight oracleBOT
#

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

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

brisk tinsel
#

hi! do you have some examples like a customer ID cus_xxx and some screenshots of what you're describing?

shy smelt
#

This customer pays with the same link email and it just keeps adding to their payment methods

#

cus_QKNkMYych5JHeq

#

this is a dev customer

brisk tinsel
#

I see

#

I don't know much about Link-as-PaymentMethod. Not sure how you'd handle this, usually there's a fingerprint on card paymentmethods so you can detect duplicates and remove them yourself but seems like that's not the case for Link.

worthy yarrow
#

Hey! Taking over for my colleague. During your tests, are you using the same email or different email when using Link ?

shy smelt
#

the same email

#

the only way i can pay with link without this happening is if i create a payment intent and confirm the payment automatically but then i don't know if this is the right way for link because it doesnt give the user the option to login with link etc it just triggers the payment

worthy yarrow
# shy smelt cus_QKNkMYych5JHeq

The customer have two payment methods: pm_1PU3h2DLwtSLU8I5b6vAtABO and pm_1PToKKDLwtSLU8I5tE8Ot26z which referes to the same card 4242

worthy yarrow
shy smelt
#

yes this is as expected because i added a new card but with the same number

#

but i was not expecting this with link because the user logs in and goes through verification then pays and this adds the new link payment method

worthy yarrow
shy smelt
#

yes

#

i can trigger the payment without the link verification and it does not create a new payment method, but then it functions link a card payment.
will this sometimes open a iframe for verification etc like it does with card?

#

i will take some screen shots

#

this is a logged in link user, showing their saved payment methods

#

i was expecting not to create a new payment method because they are logged in even through this flow that creates a new payment method. does that make sense?

worthy yarrow
#

Could you please provide some additional code snippets, on the frontend part ?

shy smelt
#

i am using the PaymentElement in next js to show this

#

i only show this if the user needs to add a new payment method otherwise i just automatically trigger payment using the backend. is this correct for link?

worthy yarrow
# shy smelt

Can you share the code behind this screenshot ?

shy smelt
worthy yarrow
#

OK I see, so you are using PaymentElement in order to collect a new PaymentMethod whether it's a Link or Card or others...

shy smelt
#

correct

worthy yarrow
#

But I'm not sure what is the difference between Link and Card... you can keep adding the same PaymentMethod using the same card number or Link using PaymentElement

#

a new PaymentMethod Id will be gnereated

#

if you want to keep only one PaymentMethod corresponding to a card or an email, then manually you need to check the fingerprint of the card and see if there is pervisouly registred card.

shy smelt
#

i guess my main question is does stripe.handleNextAction handle link, for example if the user needs to login etc?

#

because i know for card it shows an authentication window

#

this way i don't need to go to the PaymentElement and login which then also creates a new id

#

i use this to trigger payments to existing payment methods, does this work for link?

worthy yarrow
shy smelt
#

ok i think that will be fine then. thanks for the help