#redquicksilver_api
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/1492131120257437730
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
๐ Sounds like your integration may not be not checking the existing PaymentIntent's status before allowing another confirm attempt. After returning from the 3DS redirect (via return_url), your frontend should:
- Retrieve the PaymentIntent from your backend using the
payment_intent_client_secretfrom the URL params. - Check its status before doing anything else.
- Only show a success/failure page. Don't re-render the "Pay" button if the status is already
succeeded,requires_capture, orprocessing.
You're right. The system doesn't check the existing PaymentIntent's status, it just redirects to the confirmation page, (the return_url is the confirmation page). Ok, so instead of doing this, should I: Make the call to your service to make the payment, (the return_url should be and endpoint that receives the response from you as to whether it has been successful or not). When a response comes in to that endpoint, we make another call to you to check on the PaymentIntent, passing in the 'payment_intent_client_secret' that is on the querystring. This will give us the status of the paymentIntent and from there we know then if success, to send the customer to the confirmation page?
That sounds right to me, yes. On top of that, I'd recommend using webhooks https://docs.stripe.com/webhooks as the source of truth for backend fullfillment, and I'd also disable the Pay button immediately on first click to prevent accidental double-clicking
Thanks Dougal, I've implemented it this way for years on our other website, so will update that too. Do you have a page that I can read that shows me a process flow of what I need to call and when and what page I should show the customer during each stage?
With regard to the 3DS flow, this page is probably the best for showing an overfiew of the flow and how to handle each status: https://docs.stripe.com/payments/3d-secure/authentication-flow