#Matt11-error-confirm-PaymentIntent
1 messages ยท Page 1 of 1 (latest)
Hello, this morning I created a PaymentIntent (pi_3LD2XpApMCw5clA30JaOTb1k) with "requires_actions" status
I waited a few hours to confirm it and then called:
intent = Stripe::PaymentIntent.retrieve(intent_id)
the intent was intent['status'] == 'requires_action'
so I called this
intent = Stripe::PaymentIntent.confirm(
intent_id,
{
return_url: return_url
}
)
requires_action status means PaymentIntent needs to go through 3DS auth
but later this condition returned me False:
if intent && intent['next_action'] && intent['next_action']['redirect_to_url'] && intent['next_action']['redirect_to_url']['url']
are you using Stripe.js on client-side?
here I'm on Ruby
there wasn't a request on my smartphone to confirm with 3ds
because usually the confirmation on my smartphone happen after
intent = Stripe::PaymentIntent.confirm(
intent_id,
{
return_url: return_url
}
)
but since this returned FALSE I wasn't redirected
if intent && intent['next_action'] && intent['next_action']['redirect_to_url'] && intent['next_action']['redirect_to_url']['url']
but the PI was successfull and charged
can you share the PaymentIntent ID? And if you're following a guide for this, can you share the URL as well? Thanks
Not sure why the second confirmation worked ๐ค
did it happen with just this one PI or were there any other examples?
only this one
but if a lot of customers 'waits' hours before the 3ds they are going to pay without doing stuff in my application
the second confirmation request shouldn't have worked unless I'm missing something, let me check with my team about this
thanks
because the customers actions were these:
1- entered the application
2- redirected into the 3ds page where I confirmed the payment_intend passing the redirect_url
3- intent['next_action'] was empty so no redirect was made
Okay wait I think I'm misunderstanding something her
Let's step back, is your question why there was no redirect after the payment succeeded or why the 3DS authentication worked on second confirmation call?
I don't understand why after the confirmation of the PaymentIntent (via API) there wasn't a redirect to the redirect_url
Gotcha. Okay, let me take a look again
and the why intent['next_action'] was empty. thanks a lot!
Okay so as far as I can tell, retrun_url was missing from the first confirmation attempt (before 3DS) and was provided with the second one (after 3DS). I wonder if that's the reason here
I'm trying again with this one pi_3LD80QApMCw5clA30AX64z2v
last activity is requires_action
yeah you need to go through 3DS authentication
yes, so I'm going to do this
return_url = subscribe_sca_success_url
intent = Stripe::PaymentIntent.confirm(
intent_id,
{
return_url: return_url
}
)
and check if this is present
intent && intent['next_action'] && intent['next_action']['redirect_to_url'] && intent['next_action']['redirect_to_url']['url']
I'm going to print it to console
now it worked
so I'm thinking that is beacause we waited a lot of hours
because it was the only difference
how much time do I have to confirm a payment intent?
I don't think it was the time
I think it was missing return_url in the first confirmation call
but where you see that there were two confirmation calls?
One before requires_action and one after
wow I don't know from when it comes from