API Reference · Checkout Sessions
Expire a checkout session
Transitions an OPEN session to EXPIRED immediately.
POST
/v1/checkout/sessions/:id/expireUseful for invalidating a session after your customer abandons the flow in your own UI, before the 24-hour auto-expire fires. Returns 409 if the session is already COMPLETE or EXPIRED.
Returnscheckout_session object
Path parameters
idstringRequiredSession id (`cs_…`).
Errors
404
resource_missingNo session exists with that id.
409
session_not_openSession is already COMPLETE or EXPIRED.