#Sadness ;'(
1 messages · Page 1 of 1 (latest)
Hi!
So what you want to do in this case is set redirect: if_required (https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-redirect)
Then for something like a Card PaymentMethod the customer won't be redirected, and you can then handle the redirect yourself
I did it already
But what for example for iDEAL?
I mean the redirects that are triggered by stripe.js
That are required to complete payment
Yeah no this isn't possible to stop the redirect from occurring for a bank-based redirect. You would just redirect again after that point if you want to handle it yourself
Then how is it done here? https://stripe.com/docs/payments/ideal/accept-a-payment?platform=web&ui=element#web-handle-redirect Is it possible to do it with payment element simillar way?
To clarify I use payment element
One of your folks suggested me this, but I was quite not sure how to correctly do it with payment element: #1064563452623994880 message
Ah I see
Is there really no way to handle the redirect manually?
Not with Payment Element, no. Since you are relying on client-side confirmation.
Like if you try to set return_url when you create the PaymentIntent you will see an error that states you can only set that if you are also passing confirm: true
There actually would be a really hacky workaound here where you listen for the selector for Payment Element then if the customer selects a bank-based redirect and hits "pay", then instead of calling confirmPayment you create a new (ideal for example) PaymentMethod and PaymentIntent server-side and confirm it while setting return_url
Then you can handle the redirect yourself
But that is super hacky and I don't recommend it
Yeah but stripe sends the required redirect url to banking-site to client, why I can not just use it and redirect user to it?
What are problems with it.
Why is it needed to confirm payment on the server?
@rugged sable Could you take a look at this thread?
Hi one moment
Unfortunately there's not another way other than what my colleague outlined above
What if i will confirm the payment directly via API?
On the server? If so, that is server-side confirmation which is a different flow (the one you linked before)
Why is it needed to confirm payment on the server?
Stripe sends the required redirect url to banking-site to client, why I can not just use it and redirect user to it?
No, on the client
Client somehow gets this url
It's not a magic
Any workarounds? For example creating a payment method from payment element and then confirming it manually?
It is kind of confusing
OK, thanks
Thanks for your help, I will think more about this problem and if I would need help, I will ask on dev-help. Have a good day!