#abignalet
1 messages · Page 1 of 1 (latest)
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Hi there,
Thanks for sharing, the error code authentication_required means that the payment requires authentication to proceed.
https://stripe.com/docs/error-codes#authentication-required
I would expect to receive info about the 3DS challenge, why did not I receive it?
Not meaning this is due to 3DS failed challenge.
Actually your integration is trying to confim a non authenticated payment_method:
https://dashboard.stripe.com/logs/req_pewoMWr8a2WiXU
In case there is a 3ds chalenge, you'll see it in your dashboard, on the timeline of the PaymentInent
stripe should let my app the opportunity to do the pm authentication if required on confirm no?
If there was a 3DS attempt, then you'll see something like this in the timeline
I know thank you
I just want to know what to do when I receive this error code - should I retry the confirm?
stripe should let my app the opportunity to do the pm authentication if required on confirm no?
Yes, if you are doing the confirmation using stripeJs
https://stripe.com/docs/js/payment_intents/confirm_payment
But it depends how you create the PaymentMethod. I'm seeing that you are creating the payment_method without authenticating it:
https://dashboard.stripe.com/logs/req_pk6oazvqwkcfL4
I just want to know what to do when I receive this error code - should I retry the confirm?
Even if you retry, it'll fail, because the card isn't authenticated, in your integration you are creating a PaymentMehtod without authenticating it.
I invite you to take a look at this guide in order to accept payments:
https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-collect-payment-details
I do the confirmation using stripe js
I have this integration, what am I missing about authentication on payment method creation?
How are you collecting the Payment details?
using CardElement + stripe.createPaymentMethod
You need to upgrade to PaymentElements, which now will handle for you the creation of the PaymentMethod and authenticate it
https://stripe.com/docs/payments/payment-element/migration
I invite you to check the guide I mentioned above after for a complete integration:
https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-collect-payment-details
We cannot migrate to payment element, our UI won't support it
Try replacing stripe.createPaymentMethod to stripe.confirmCardPayment directly
https://stripe.com/docs/js/payment_intents/confirm_card_payment
Not a little change by our side, could you explain why it would change something?
Actually, you are using an old integration that's why I invited you to migrate to the new integration.
Not a little change by our side, could you explain why it would change something?
stripe.confirmCardPayment will create the payment_method, authenticate it and if needed will carry out 3DS or other next actions if they are required. SO that the PaymentMehtod is fully authenticated.
in your flow you are just creating the payment_method without authenticating it when using juststripe.createPaymentMethod
but i call confirmCardPayment with the paymentMethodId just after
It is this call that fails instead of authenticating my pm
Honestly this is an old integration and not very familiar with,
Could you please share a snippet code that reproduce this issue ?
<CardElement>
<button submit>
submit() {
const {error, paymentMethod} = await stripe.createPaymentMethod({ type: 'card', card: cardElement });
const {clientSecret} = await myApi.pay(whatever)
const {error, payment_intent } = await stripe.confirmCardPayment(clientSecret, {payment_method: paymentMethod.id, return_url: 'https://our-website.url/3DS'})
const is3DS = payment_intent.next_action.type === 'redirect_to_url';
if (is3DS) window.redirect(action.redirect_to_url.url)
}
Thanks for sharing let me check
Hi! I'm taking over this thread.
Can you try to summarize your question, while I catchup with this thread?
how can I avoid authentication_required on confirmCardPayment
What do you mean? Do you have an example of this happening? Is this the PaymentIntent you shared earlier? pi_3LswDrDlpLzq27jH2DGE9VkP
exactly
Do you get a lot of PaymentIntent in that state? To me this simply looks like the bank declined that specific payment.
Like more than 30 this previous weekend
I just wanted to know if it was possible to avoid them
It represents nothing big but we are looking to get rid of it if possible
But we usually get less than this number
Sorry for the delay, looking into this.
@hazy compass you wrote to our enterprise support team about this too and are in touch with them, let's keep the conversation there