#iandk
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
- iandk, 10 hours ago, 17 messages
I thought the Elements would offer this by default in combination with the Link thing?
https://gist.github.com/iandk/fe5992b8d73c1e25b9c3a8c0912ab46a
Link is different from Payment Methods attached to a Customer objects saved on just your account. Instead, Link payment methods are used by customers across all Stripe accounts.
how would I offer him to select his previously used methods there?
You can enable Link and not worry about anything else.
Or, if you want to specifically show the Payment Methods saved for the customer on your account, you will have to build a list of Payment Methods yourself.
I did implement Link, but its not showing
Again, the main question, are you looking to use Link, or display your own PMs?
Link would be fine for now
Ok, let's see why it's not showing. Where do you expect to see it exactly?
I did follow the guide where it would show somewhere near the payment-element
<template #content>
<form id="payment-form">
<div id="link-authentication-element"></div>
<div id="payment-element">
</div>
<div id="payment-message" class="hidden"></div>
</form>
</template>
Could you please share the PaymentIntent ID pi_xxx?
pi_3OVBHxCaKPzbNr2f0m6Wh7xj
Hey! Taking over for my colleague. Let me catch up.
Could you please share the exactl guide you are following ?
in order to understand what flow exactly you want to integrate ?
That guide doesn't have link authentification link-authentication-element like you were mentioning in your code snippets
If you want to use link authentification element, you need to follow this guide instead:
https://stripe.com/docs/payments/link/link-authentication-element
I think this is the guide I followed
Ah I don't know what happened but when I opened your previous link, it opened for me another page.
Yes that's a good one sorry
Can you share some screenshots of your webpage ? or if possible to access it from a live (test) endpoint ?
Can I send you the details as a private message?
Here is another pi
pi_3OVCAYCaKPzbNr2f1vAUAxAC
Did you activate link in your dashboard ?
not sure, where can I check?
It was disabled. I just enabled it but its still not showing
I did verify the domain
I invite you to share with me a test endpoint and all the steps required in order to reproduce it
Yea, how can I send you the details?
I would prefer not sending it in a public thread
let me know if you can access it
Can you check console?
I think its an issue with the certificate and vite.
You might have to open one of the failed vite urls manually and accept the cert
I inivte you to share with us a clear and working way in order to reproduce the issue and understand your integration
I followed every step in your guide.
The code is pretty much identical and I attached it above
Yes I understand that, but we need a clear way in order to reproduce the issue you are facing.
I can provide you the login details, I just dont want to post them in a public thread here. So if you give me some way to send them to you directly
no worries, the best way then would be a support ticket at https://support.stripe.com/?contact=true (this team also answers support tickets)
for clarity, if not using Link you would need to implement showing saved cards by calling https://stripe.com/docs/api/payment_methods/customer_list on the backend, then parsing the list and returning details(like the payment_method.card.last4 etc) to the frontend to render a HTML table there, and then calling https://stripe.com/docs/js/payment_intents/confirm_card_payment#stripe_confirm_card_payment-existing directly with the ID of a selected PM when the customer clicks it
we have some other plans in future to directly embed saved cards in PaymentElement but at the moment it would be manual like that; and separately, Link exists yes
Does this work with cards only or other payment methods as well?
the approach above works with any saved payment method that is compatible with recurring payments, for example youc can call https://stripe.com/docs/js/payment_intents/confirm_sepa_debit_payment#stripe_confirm_sepa_debit_payment-existing if the selected PM was SEPA Debit
I'm dealing with one time charge
yeah, but you're charging a saved payment method, I'm only referring to "recurring" here to differenciate from payment methods that are only compatible with one-time payments and couldn't be saved to Customer objects or used in future payments
pm_1OVD4TCaKPzbNr2f1UPuhedB
Would this be the id I need to pass to the stripe js client to confirm the payment?
yes
Seems to work just fine with cards.
One more question regarding stripe.confirmPayPalPayment.
After confirming/ declining the payment I will be redirected to the specified url.
How can I determine if the payment was successful on the frontend?
With the card implementation I can access result.paymentIntent.status as the page does not refresh
there are query parameters with the PaymentIntent ID that we add to the return URL and then you can access those and call the retrievePaymentIntent function to check status
it's touched-on/described at the section from https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-test-the-integration:~:text=we provide the following URL query parameters%3A onwards
I see now, thank you.
Is it safe to store the clientSecret in lcoal storage?