POST
/v1/checkout/sessions/{id}/expireFind an endpoint or a guide of the Sovgate API reference and jump straight to it.
/v1/checkout/sessions/{id}/expireEnd an open session now, so it can no longer be paid.
POST /v1/checkout/sessions/{id}/expire| Name | Type | Description |
|---|---|---|
id | string | The session's ID, cs_.... |
curl -X POST https://api.sovgate.com/v1/checkout/sessions/cs_test_8a34998a7056ac775cff7b78/expire \ -H "Authorization: Bearer sov_sk_test_your_key" \ -H "Idempotency-Key: 3fc40152-4b2a-4c1d-9e3f-393427327799"{ "id": "cs_test_8a34998a7056ac775cff7b78", "object": "checkout_session", "livemode": false, "mode": "payment", "status": "expired", "payment_status": "unpaid", "ui_mode": "hosted_page", "currency": "usd", "amount_total": 4000, "line_item_count": 1, "customer": null, "client_reference_id": "order_8812", "metadata": { "cart": "c_1042" }, "url": null, "payment_link": null, "payment": null, "attempts": 0, "created": "2026-11-27T14:00:00Z", "expires_at": "2026-11-28T14:00:00Z", "completed_at": null, "expired_at": "2026-11-27T14:20:00Z"}| Code | When |
|---|---|
invalid_state | The session isn't open, or a payment is being attempted in it right now. |