#kopito_code
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1233379005537976451
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
๐ happy to help
you need to change your integration
instead of using the next_action URL
you need to create a new page on your app, and basically send them to that page with a unique ID
so they will need to enter their payment details again, correct?
no they don't
but I just found another way to do it
but before sharing that other approach let's finish this one
Okay, so what this new page will do, in my server i have just the payment intent that was created, with what unique ID should i sent them to the page
basically they get to that page, from that link you get the unique ID (which can technically be the pi_xxx but you can decide to hide behind another ID) and you fetch from your backend the client_secret of the PI in question and confirm using only the clientSecret
Okay, that makes sense, and so then i call the confirmPayment with the client_secret on my backend, but what happens when it requires the 3D secure
confirmPayment with the client_secret on my backend,
on the front end
not on the backend
you're already sending them to that page because the PM that they provided needed 3DS
so by using confirmPayment(clientSecret) and since the PI is in status requires_action Stripe.js will handle the 3DS flow for you
the other option is using https://docs.stripe.com/payments/3d-secure/authentication-flow#render-iframe instead of what you're already sending, but I highly recommend not going with that approach
this will only work for 3DS
oh, i thought confirmPayment was a backend function. Yes that makes total sense. I will try this now and hopefully it works. I will text again if im facing any issues
while what I'm suggesting works with any kind of PM type
Okay i will go with the first suggestion, it looks a lot better than this iframe
Thank you very much for your time, hopefully it works from the first time and I won't have to bother you again ๐
no I didn't mean to use the iframe, but instead send the user the URL we're using to load the iframe
that was basically what you were doing
but we changed the URL's place technically
but in all cases that's not recommended
I hope the first option works, it makes much more sense, will keep in touch ๐ Thanks again