#persistentcoder_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/1235246043550187675
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello, can you send me the ID of the payment that you are seeing that status on? Is that a decline code? If this is a decline code, then yes you can definitely have your own Elements page that lets the user attempt the payment again on that same payment intent
You can also pass the ID of an existing payment method if the user wants to retry with a saved PM without re-entering the details https://docs.stripe.com/js/payment_intents/confirm_payment
pi_3PBaWfAPE7fE5Drs0Mog4rKD
im just testing with test card 4000002760003184
Just to be sure, so there is no hosted solution for handling this scenario, where we need user to redirect to stripe hosted page which uses existing payment intent and payment method for which he just authenticate?
Not for payment intents that you create directly. For a Stripe hosted solution you can create an Invoice and send the user to the hosted page if the payment fails, otherwise you can cancel the payment intent and create a Checkout Session for an identical amount and send the user to that URL
aah, got that. Just a feedback, it would be very convenient if checkout session can take existing payment intent as this is a very common scenario and avoids building custom elements in our app
Yep, I can definitely see how that would be useful. I will file a feature request for that
Thanks for the help. Very impressed with stripe support, prompt and to the point. One last question though, for others cases where payment fails off sesssion, i should bring user back to session with create session and cancel the earlier payment intent , correct?
As there are too many failure codes, handling them case by case is what you suggest?
Happy we're so helpful! Yep that is a totally fine way to handle that. For declines, I think the best way to handle it is usually to bring the user back on to try again themselves