# cancel_order

> Cancel (delete) an unpaid order — a confirmation, never immediate: this returns `{status:"confirmation_required", confirmationUrl, preview}` and the customer approves…

- Tier: D
- Required scope: write:orders
- Annotations: destructiveHint
- Docs: https://api.inleed.com/tools/cancel-order

## Description

Cancel (delete) an unpaid order — a confirmation, never immediate: this returns `{status:"confirmation_required", confirmationUrl, preview}` and the customer approves on the card in the chat; only then are the order's proforma invoice and its pending services deleted. Nothing is charged or refunded — a cancelled order simply ceases to exist; to buy again, place a new `create_order`. Only an unpaid proforma with no pending automatic payment can be cancelled: a paid order comes back as `conflict`, untouched — it is a service by then, end it with `cancel_service`. Requires `write:orders`.

## Input schema

- `order_id` — integer (required). The order to cancel, from list_orders → data[].orderId. Minimum 1.
- `attempt_key` — string. Optional idempotency key so a retried call reuses the same confirmation instead of creating a second one.

## Example call

```json
{
  "name": "cancel_order",
  "arguments": {
    "order_id": 1
  }
}
```

