#.abishek

1 messages ยท Page 1 of 1 (latest)

left ermineBOT
orchid laurel
#

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

visual forge
#

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?

orchid laurel
#

If you wish to have customer performed authentication, why do you set {handleActions: false}?

visual forge
#

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

orchid laurel
#

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 ?

visual forge
#

yes

orchid laurel
#

Customer will be brought back to this return_url after performing next action regardless it's handled manually or by Elements

visual forge
#

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.
orchid laurel
visual forge
#

oh, so the return_url is still required?

orchid laurel
#

Yes. Without return_url being set, customer won't be able to be brought back

visual forge
#

ok, and is the nextAction only for credit cards or are there any other payment methods that require it?

orchid laurel
#

Any redirect based payment method will have next action

visual forge
#

where can I find on the docs those payment methods?

orchid laurel
#

We don't have a doc for this

visual forge
#

ok

#

the last column has Payment Confirmation

#

which is either Immediate or Delayed

#

would that be a good start?

orchid laurel
#

Not really. Some redirect based payment methods can be immediate. How are you integrating with Stripe currently? Are you using Payment Element?

visual forge
#

Yes, Payment Element with Web Elements

#

trying to find a way to test how return url works

#

but they just open the 3DS frame and after I click Complete it just closes the window

orchid laurel
#

Can you share the Payment Intent ID (pi_xxx) that opened 3DS frame?

visual forge
#

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

orchid laurel
#

Are you using stripe.confirmPayment() or stripe.confirmCardPayment() at client?

visual forge
#

stripe.confirmPayment

left ermineBOT
orchid laurel
#

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

visual forge
#

it seems to support though, I get the payment Intent immediately and the redirect doesn't happen

orchid laurel
#

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

visual forge
#

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?

manic cosmos
#

๐Ÿ‘‹ stepping in and gimme a few mins to catch up

visual forge
#

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?

manic cosmos
#

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

visual forge
#

so, when stripe redirects back to the return_url it does set any parameters to identify the payment intent id or something?

manic cosmos
visual forge
#

ah, perfect. can you please share the url

visual forge
#

thank you

visual forge
#

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?

manic cosmos
#

Should be the same. No specific reason and you can just use the Id to retrieve

#

AH wait

#

This expects clientSecret