---
title: "Cancel a checkout session"
method: POST
path: "/api/agent/cancel_checkout"
tags: ["checkout"]
---

# Cancel a checkout session

`POST /api/agent/cancel_checkout`

## Request

- Base URL: `https://www.test-well.com`
- URL: `https://www.test-well.com/api/agent/cancel_checkout`
- Auth: none declared

Cancel an open (unpaid) checkout session. Paid sessions cannot be canceled here — the patient's complete-details email explains refunds.

## Request body

- object
  - `checkout_session_id` string, required

## Response `200`

Tool result

- object
  - `tool` 'cancel_checkout', required
  - `result` object, required
    - `id` string, required
    - `status` string, required

## Other responses

- `400`: Invalid input
- `429`: Rate limited

---

[API](https://skmtc.dev/test-well/apis/testwell-agent-api.md) · [All operations](https://skmtc.dev/test-well/apis/testwell-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/test-well/apis/testwell-agent-api/revisions/6e260731dfa4?raw)
