#gabrieln_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/1290747589431660687
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
Was this email a recovery email? If so, this is expected - https://docs.stripe.com/payments/checkout/abandoned-carts?payment-ui=stripe-hosted#send-recovery-emails
@teal sequoia no it's our email, just think of it as the checkout link was saved somewhere and then opened later after it was expired, but wasn't generated again since it was saved previously
Oh you're using a PaymentLink. PaymentLink creates a new checkout session on its own
The PaymentIntent you've shared was cancelled. So you likely confirmed a different PaymentIntent that was generated by a different checkout session
@teal sequoia let me explain it again
I did:
-
await stripe.checkout.sessions.create({})
-
then got checkout session link and saved it
after that I
3 expired it by using await stripe.checkout.sessions.expire()
then I went back to the link I saved in step 2 and it was still working and I was able to use a credit card to pay using it
You're saying that just by opening the old expired link it creates a new session?
The PaymentIntent you shared pi_3Q5AutDY3BzcP9iq1bCskyU6 was created by this checkout session object - cs_test_a1PejuNtSbPRCE2m26tp7yZMKtdo7P0SiephBjknYchb2xdZyqvyGAo7fJ
That checkout session expired, so you couldn't have confirmed that specific one. It would've errored. Like it is erroring out right now..
So I'm not sure what link you saved and went back to..
Can you share the PaymentIntent ID that succeeded?
@teal sequoia for example, this is the checkout link that is supposed to be expired https://buy.stripe.com/c/pay/cs_test_a14u89ZFDvhp6SBkDGZeg8KOaZ1OA356eTvJb4p4ygxcQqGiEKuReWfI0k#fidkdWxOYHwnPyd1blpxYHZxWjUzZ0hGPTBVaW1qbE5LfUBLdVR0Tl9SNycpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBabHFgaCcpJ2BrZGdpYFVpZGZgbWppYWB3dic%2FcXdwYHgl
it's payment_id is pi_3Q5AutDY3BzcP9iq1bCskyU6 and the status is expired but I can still buy from it
If you retrieve the checkout session object using the API - https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-recovered_from
You'll see the old checkout session ID in recovered_from field..
cs_test_a1PejuNtSbPRCE2m26tp7yZMKtdo7P0SiephBjknYchb2xdZyqvyGAo7fJ was the old checkout session ID that generated -> pi_3Q5AutDY3BzcP9iq1bCskyU6 and the PaymentIntent was also canceled when the checkout session expired
So you're saying this is happening because the link is being recovered, correct?
Yes
So if expiring doesn't make it unrecoverable, what can I do so it can't be recovered again? This is for a order canceled flow, usually we only want to recover it if the link expired by time
Is that what happened on pi_3Q3kicDHWn8mq0mm0fGF0epN? This is the production order that I'm guessing recovered after the order was cancelled and the link expired
When you create checkout sessions, you're passing recovery.enabled as true
https://dashboard.stripe.com/test/logs/req_akiKFZvA99ubVQ
You shouldn't do that if you're trying to prevent cart recoveries
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Well I want it to be recoverable normally unless the order is cancelled, isn't there a way to make it recovery.enabled as true but manually cancel it?
No, I don't think there's a way to disable it manually
not disable it but just kill the checkout even with recovery as true
Not possible as far as I can tell
What happens then if the payment_Intent it cancelled and someone tries to recover the link?