#flickcall
1 messages · Page 1 of 1 (latest)
hello, we can continue on a new thread. What's your question?
So I was trying to use https://stripe.com/docs/payments/3d-secure?platform=web#when-to-use-3d-secure to manually redirect user to new window on 3D authentication.
I am using const response = await stripe.confirmPayment({
//Elements instance that was used to create the Payment Element
elements,
redirect: 'if_required',
confirmParams:{
return_url : 'https://flickcall.com'
}
});
but based on documentation, it looks like i won't get response before attempting for 3d secure popup
"Use stripe.confirmPayment to confirm a PaymentIntent using data collected by the Payment Element, or with manually provided data via confirmParams. When called, stripe.confirmPayment will attempt to complete any required actions, such as authenticating your user by displaying a 3DS dialog or redirecting them to a bank authorization page. Your user will be redirected to the return_url you pass once the confirmation is complete."
is there a parameter that will give me paymentintent response right before triggering 3d authentication so that i can open the bank site in new tab
If you want to manage 3DS yourself, you need to set the return_url. I suggest reading this section for more detail : https://stripe.com/docs/payments/3d-secure#manual-redirect
thats what I did, but looks like that params is for stripe.confirmCardPayment not stripe.confirmPayment
shall I change my client side code from stripe.confirmPayment to stripe.confirmCardPayment? what I would be loosing out when using confirmcardpayment?
it should work with stripe.confirmPayment also, maybe test it out and let us know if you're running into any errors
i did and this is the code I used, but I am not getting "response "
const response = await stripe.confirmPayment({
//Elements instance that was used to create the Payment Element
elements,
redirect: 'if_required',
confirmParams:{
return_url : 'https://flickcall.com'
}
});
console.log(response);
and below is the screen right before that,
what's the PaymentIntent id?
I used $subscription->latest_invoice->payment_intent->client_secret from backend while creating subscription. That is used to create stripe.elements
you need actual value of id?
pi_3NJAwySDXvJyqJf607hqN7Us
and this is the code at backend to create subscription
to be clear the question is how to get a next_action with redirect_to_url instead of use_stripe_sdk when using the Subscriptions API to create the PaymentIntent?
you should report this to us at https://support.stripe.com/?contact=true . We have a way to flag banks that have that problem(refusing to allow their page to be put in a frame) into behaviour where we automatically prompt to open the page in a new window instead
exactly
not sure about use_stripe_sdk but how yes - how to get next_action when using stripe.confirmPayment method on client side
well the best option is to report it so we flag that bank into the fallback behaviour to address that one problem with that specific bank in live mode. It's really awkward to change your integration to be able to get the redirect_to_url action for Subscription payments like that, it kind of requires completely re designing things.
Interestingly I have seen ICICI works with other integration (they may not be from India) but my spefic setup doesn't works. Other banks are working.
ok will do that, but just curious - what is the right way using subscription->create api at backend
if flagged it will look like this instead
if you-reconfirm the PaymentIntent and pass return_url you'll get a redirect action
but again it requires completely changing your approach to attach the PM server-side and confirm server-side, so it's not really the right approach I think. You should try to escalate with our support team to get that specific bank to use the "open in new window" fallback we have.