#Danik
1 messages · Page 1 of 1 (latest)
Hi there, can you share with me the code on how you create and mount the link_authentication_element?
Hi, yeah sure
First of all, I want to stay with the "AutomatedPaymentMethod.Enabled = true", so customers will have all the available payment method. Secondly, I if customers use the Card payment method, then there should be available the Link payment they previously saved on any other Stripe-integrated websites.
That's my goal
Give me some time to read your code and I'll get back to you soon
Yeah, no problem )
Hmm, are you creating a SetupIntent instead of a PaymentIntent in your backend?
I create SetupIntent for the data-secret attribute following the Stripe docs (https://stripe.com/docs/payments/save-and-reuse#web-create-intent), but also PaymentIntent from JavaScript (AJAX-call).
can you check if you backend is returning a valid paymentIntent client secret?
This is paymentIntent ID, not client secret.
pi_3Lp4hNIjD9jLTt0t1QgXfjDf_secret_WWL6aeibwWrDR2ozJP989rKG3
this one I captured after AJAX-call
on client side JavaScript
Do you see any errors in browser console log?
Is the payment element showing up in your page?
Ok, I think I know the problem
you need to pass link as one of the payment_method_types when creating a paymentIntent
But I use AutomatedPaymentMethods.Enabled = true
Should I turn it off?
Enabled = false?
Did you turn on link in your payment methods settings page? https://dashboard.stripe.com/settings/payment_methods
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Hmm, can you remove the automatic_payment_methods, and explictly set a payment_method_types that includes link ?
ok I'll try it
but we prefer to use Automatic payments
my company wants to manage them from the dashboard
Hmm wait
Your account country is JP where Link is not yet available
Please visit https://stripe.com/docs/payments/link for Link's country availability
There's a link in the page for you to sign up for early access
Checkout can also help you pre-fill the credit cards if you specify a customer that has credit card attached it it.
Can you provide an example?
I have both Customer Id and Payment Method Id with saved credit card
but can't figure out how to pass them to the PaymentIntent
so it will be pre-filled
To use Stripe Checkout, you need to create a Checkout Session instead of a PaymentIntent
ok, I'll check it thank you
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer here's the API ref
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I have another question.
Is there a way somehow to capture the event when customer switches from one PaymentMethod to another on web-page:
I want to capture this event on JavaScript code.
Client-side
So I could show additional UI elements to the user.
For example, if the "Card" element is active, I show "Pay with previously saved card" button, if another iDEAL is active I hide it and etc...
No there's no API to capture such tab switching events
ok, thank you anyways