#wakinki_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/1293581346433794059
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, you can expire the session using the code: https://docs.stripe.com/api/checkout/sessions/expire?lang=node. The cancel_url is for if the customer presses the "back" button on the top right of the Checkout page, to cancel out of the payment page. So it would be a URL of your website you specify to land your customer on.
Even after navigating to a cancel_url, the CheckoutSession remains usable (until it is manually expired or expires by default 24 hrs after creation).
Can you speak more to why you would want to expire it so I can provide a more accurate recommendation?
I want to invalidate the session when a user clicks the back button because we have no way to get back to the session so it is useless. The session is now expired after 30 minutes but it would be preferable if it was expired right away when a user clics on the back button
What do you mean by 'no way to get back to the session'? That URL would work as long as it has not expired. If you added 30 mins to expire, https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-expires_at they can still pay/ use that link in that period.
yes but if the user doesnt copy the url it will become unaccesable and we generate a new url if a user places the order another time
I see, you can track this on your end. If you do not see 'checkout.session.completed' or failed events, you can expire the session.