ucp_cancel_checkout
Cancel a UCP checkout session. Transitions to 'canceled' status. Cannot cancel already completed checkouts. Use ONLY for a checkout session created with ucp_create_checkout (Universal Commerce Protocol); for the standard flow (create_cart, preview_checkout, complete_checkout) do not call this tool. Checkout guide: read the MCP resource trusteed://guides/checkout.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | Optional cancellation reason | |
| agent_key | No | Sandbox credential from `create_sandbox_key`. Use this when your client cannot set an `Authorization: Bearer` header. | |
| checkout_id | Yes | UCP checkout session ID (valid UUID) | |
| idempotency_key | No | REQUIRED for this write unless sent as the `Idempotency-Key` header or `params._meta["trusteed/idempotency-key"]`. 1-128 chars from [A-Za-z0-9._:/-]. Reuse the same value when retrying the same operation. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| label | No | ||
| intent | No | ||
| status | Yes | ||
| totals | Yes | ||
| currency | Yes | ||
| next_step | No | Next-action code, not a tool name: provide_shipping_destination, refresh_shipping_rates, choose_shipping_option, ask_user_payment_method. | |
| created_at | Yes | ||
| expires_at | No | ISO-8601 UTC instant at which this checkout SESSION stops being usable. It is not a stock reservation and not a price guarantee. | |
| extensions | No | `warnings[]` with `code`, `message`, `severity`. | |
| line_items | Yes | ||
| updated_at | Yes | ||
| fulfillment | No | ||
| next_action | No | Only when a person must approve or pay: `url`, `kind`, `retry`. | |
| approval_url | No | ||
| idempotency_key | No | ||
| payment_options | No | When present, ask the person which option they want; never choose for them. | |
| next_step_message | No | ||
| expires_in_seconds | No | Whole seconds left on this checkout SESSION at response time (0 when already past). It is not a stock reservation and not a price guarantee. |