#.abishek
1 messages ยท Page 1 of 1 (latest)
return_url is used for redirect based payment methods that the customer will be redirected to this url after completing the payment at the payment method page
ok, I came across this docs https://stripe.com/docs/payments/3d-secure#confirm-payment-intent where you can prevent the actions that require return_url by adding {handleActions: false}
so, if this is the case and the return url doesn't get navigated, how can we perform further authentication. I understand we have to look for the data on the webhook, to get the next_action.
What happens if the next action is time-sensitive?
If you wish to have customer performed authentication, why do you set {handleActions: false}?
I load the web elements on a modal and the success message happens within the modal, so if I redirect them, I need to figure out a way to bring them back. If i set handleActions:false
handleActions:false is to stop the action handling by the Elements. Do you mean you would like to redirect the customer manually for authentication instead of handling automatically by Elements ?
yes
Customer will be brought back to this return_url after performing next action regardless it's handled manually or by Elements
on the success message, I want to show a button to redirect the user for next action instead of the elements doing it
does it make sense
Like saying
You are almost done with your Order, your bank requires further action for this transaction. Please click here to complete it.
Gotcha! Then the steps will be:
- Set
handleActions:falseand handle the next action manually as described in https://stripe.com/docs/payments/3d-secure#confirm-payment-intent - Once the customer completes the authentication, he/she will be bring back the URL specified in
return_url
oh, so the return_url is still required?
Yes. Without return_url being set, customer won't be able to be brought back
ok, and is the nextAction only for credit cards or are there any other payment methods that require it?
Any redirect based payment method will have next action
where can I find on the docs those payment methods?
We don't have a doc for this
ok
the last column has Payment Confirmation
which is either Immediate or Delayed
would that be a good start?
Not really. Some redirect based payment methods can be immediate. How are you integrating with Stripe currently? Are you using Payment Element?
Yes, Payment Element with Web Elements
trying to find a way to test how return url works
trying these cards https://stripe.com/docs/payments/3d-secure#three-ds-cards
but they just open the 3DS frame and after I click Complete it just closes the window
Can you share the Payment Intent ID (pi_xxx) that opened 3DS frame?
pi_3NpkbmJkQCRoh7rJ02KAFNw3_secret_4Yd2DEYEhc8AUwLjR3hENT4pR
this is a test PI though
also, is it always redirect or are there any other type applicable? like entering an OTP or something similar that needs to be handled by ourselves
Are you using stripe.confirmPayment() or stripe.confirmCardPayment() at client?
stripe.confirmPayment
handleActions:false is only supported in stripe.confirmCardPayment() for card authentication
stripe.confirmPayment() doesn't support handling the next action manually for all payment methods
it seems to support though, I get the payment Intent immediately and the redirect doesn't happen
Stripe doesn't throw error when passing unsupported parameter at client.
Since handleActions:false isn't supported in stripe.confirmPayment(), Elements will always handle the next action automatically, i.e. popping 3DS modal instead of returning a next action URL to redirect
the reason why I am saying it works is because whe I added redirect: 'if_required' to confirmPayment along with handleActions, then it gave me the following error
IntegrationError: stripe.confirmPayment(): `redirect` not applicable when `handleActions` is false.
when I use a 3DS card 4000000000003220, it doesn't open the 3DS window, but just outputs the payment intent on the else block
make sense?
I think I will just need to go through what the next action is and support that https://stripe.com/docs/api/payment_intents/object#payment_intent_object-next_action
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
๐ stepping in and gimme a few mins to catch up
I am only going to support a handful of payment methods, so I can go through each next action attributes to see which payment methods will have these and progressively start supporting it. atleast for the MVP, I can target the major ones
on the return_url does stripe pass any parameters?
Yeah I think you can go for a handful set of payment methods first, and no I don't think return_url could accept some parameter. Genenrally you would want to retrieve back the PaymentIntent, where you could set metadata previously
so, when stripe redirects back to the return_url it does set any parameters to identify the payment intent id or something?
ah, perfect. can you please share the url
thank you
what is the purpose of the client secret on the URL provided on the return URL, will it be the same as the one originally provided when the payment intent was created?
Should be the same. No specific reason and you can just use the Id to retrieve
AH wait
It's needed if you want to retrieve client side https://stripe.com/docs/js/payment_intents/retrieve_payment_intent
This expects clientSecret