#ELIZZER
1 messages · Page 1 of 1 (latest)
hello! could you elaborate on what you mean by open a expired checkout session?
yeah sure
i am working on a booking site
i want to init booking only if the payment is done
alright, but what does this have to do with an expired checkout session?
if the payment is not done and the session is expired, i want to recreate the same session
if the Checkout Session is expired, you would need to create a new Checkout Session.
The way you would go about it is to create the Checkout Session with either metadata or a client_reference_id. When the Checkout Session is completed, upon receipt of the checkout.session.completed event (and with the details in metadata or client_reference_id), you can then create a booking in your server
you can take a look at https://stripe.com/docs/payments/checkout/fulfill-orders too
and do we have a webhook for a checkout session payment?
you're referring to the webhook for a successful payment? you can use the checkout.session.completed event. If you're using async payment methods then you would need to handle and process the events mentioned here too : https://stripe.com/docs/payments/checkout/fulfill-orders#delayed-notification
if you want to recreate the same checkout session if it was abandoned : https://stripe.com/docs/payments/checkout/abandoned-carts is probably what you're looking for