curl -X POST \
"https://www.gomry.com/api/v1/checkout_sessions/acp_sess_AbCdEfGhIjKlMnOpQrSt/cancel" \
-H "X-API-KEY: your_api_key" \
-H "API-Version: 2025-09-12"
const res = await fetch(
`https://www.gomry.com/api/v1/checkout_sessions/${sessionId}/cancel`,
{
method: "POST",
headers: {
"X-API-KEY": process.env.GOMRY_API_KEY,
"API-Version": "2025-09-12",
},
}
);
const session = await res.json(); // status: "canceled"
{
"id": "acp_sess_AbCdEfGhIjKlMnOpQrSt",
"buyer": { "name": "Ada Lovelace", "email": "ada@example.com" },
"status": "canceled",
"currency": "usd",
"line_items": [
{
"id": "li_1",
"item": { "id": "TktAbCdEfGhIjKlMnOpQ", "quantity": 2 },
"base_amount": 15800,
"discount": 0,
"subtotal": 15800,
"tax": 0,
"total": 16790
}
],
"totals": [
{ "type": "total", "display_text": "Total", "amount": 16790 }
],
"messages": []
}
Checkout Sessions
Cancel Checkout Session
Abandon an open checkout session
POST
/
checkout_sessions
/
{checkout_session_id}
/
cancel
curl -X POST \
"https://www.gomry.com/api/v1/checkout_sessions/acp_sess_AbCdEfGhIjKlMnOpQrSt/cancel" \
-H "X-API-KEY: your_api_key" \
-H "API-Version: 2025-09-12"
const res = await fetch(
`https://www.gomry.com/api/v1/checkout_sessions/${sessionId}/cancel`,
{
method: "POST",
headers: {
"X-API-KEY": process.env.GOMRY_API_KEY,
"API-Version": "2025-09-12",
},
}
);
const session = await res.json(); // status: "canceled"
{
"id": "acp_sess_AbCdEfGhIjKlMnOpQrSt",
"buyer": { "name": "Ada Lovelace", "email": "ada@example.com" },
"status": "canceled",
"currency": "usd",
"line_items": [
{
"id": "li_1",
"item": { "id": "TktAbCdEfGhIjKlMnOpQ", "quantity": 2 },
"base_amount": 15800,
"discount": 0,
"subtotal": 15800,
"tax": 0,
"total": 16790
}
],
"totals": [
{ "type": "total", "display_text": "Total", "amount": 16790 }
],
"messages": []
}
Cancel Checkout Session
Marks an open session as abandoned.Requires
checkout: write and an allowlisted partner key. No signature is needed — cancel carries no body. Send API-Version as on every other checkout call.An open session does not hold inventory — tickets are only claimed at completion. Cancelling therefore releases nothing and is not required to free stock, but it is still the correct way to close a cart you have abandoned.
Path Parameters
string
required
The session to cancel.
Response
200 with the session, now status: "canceled".
Cancellation is terminal. A canceled session cannot be updated or completed — both return 409 invalid_session_state.
A completed session cannot be canceled
Once tickets are issued, this endpoint is the wrong tool and returns409 invalid_session_state. Cancelling a checkout session is not a refund — it only abandons a cart that was never paid.
To refund or cancel a real order, use the organizer’s own tools or the Payments API. Refunds follow the organizer’s policy, not the agent’s.
curl -X POST \
"https://www.gomry.com/api/v1/checkout_sessions/acp_sess_AbCdEfGhIjKlMnOpQrSt/cancel" \
-H "X-API-KEY: your_api_key" \
-H "API-Version: 2025-09-12"
const res = await fetch(
`https://www.gomry.com/api/v1/checkout_sessions/${sessionId}/cancel`,
{
method: "POST",
headers: {
"X-API-KEY": process.env.GOMRY_API_KEY,
"API-Version": "2025-09-12",
},
}
);
const session = await res.json(); // status: "canceled"
{
"id": "acp_sess_AbCdEfGhIjKlMnOpQrSt",
"buyer": { "name": "Ada Lovelace", "email": "ada@example.com" },
"status": "canceled",
"currency": "usd",
"line_items": [
{
"id": "li_1",
"item": { "id": "TktAbCdEfGhIjKlMnOpQ", "quantity": 2 },
"base_amount": 15800,
"discount": 0,
"subtotal": 15800,
"tax": 0,
"total": 16790
}
],
"totals": [
{ "type": "total", "display_text": "Total", "amount": 16790 }
],
"messages": []
}

