#mathieu_webhooks
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/1289136858508562466
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
I want to expire old session if the current user try to checkout a second time
The expire endopoint (in our side), add the reserving stock in the order to the product
I guess the session actually expired
but in the final endpoint, i don't see the response
Could you please share the Request ID where you expire the Checkout Session manually req_xxx? https://support.stripe.com/questions/finding-the-id-for-an-api-request
of course : req_vpJ4H89PTK3FIP
This is a request to update the webhook endpoint. Not to expire the Checkout Session.
This one : req_OAZLlg5BXb6Jw6 ?
No it's the same type of request
This request just updates the list of webhook event types that Stripe will send to this webhook endpoint.
Ok, so maybe the request just not trigger
I mean checkout.session.expire
What are you trying to achieve by this request exactly, on high level?
Or "expecting to achieve"
You need to use this method to expire the Checkout Session: https://docs.stripe.com/api/checkout/sessions/expire
When a user click on "pay button", products are reserved for 5 minutes. If the current user don't pay in time, the checkout session is flag as "expire "
When the order is expired, the stock of the product is re-incremented
Okay, this makes sense.
And then you want to expire the Session manually if they create a new one, right?
Are you calling this method? https://docs.stripe.com/api/checkout/sessions/expire
Yes this is my second case
Yes i use this method
Maybe i can use only this method and not the webhook
What do you mean?
Just waiting for the response of the API call, but i'm not sure if another thing can expire the session
A session can expire after a set time: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-expires_at
But do you have a Request ID of a call to https://docs.stripe.com/api/checkout/sessions/expire?
Ok i solve the problem, it was an error in account.
Sorry for this, thanks a lot