> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useagentbank.com/llms.txt
> Use this file to discover all available pages before exploring further.

# cancel_payment

> Cancel a durable payment while cancellation remains valid.

**Authentication:** `settlement:prepare`\
**Mutates state:** Yes\
**Idempotency:** Stable `request_id`\
**Confirmation:** Obtain explicit user confirmation before calling

```json theme={null}
{
  "request_id": "stable retry ID",
  "payment_id": "pay_...",
  "reason": "optional"
}
```

Call only after reading `get_payment`. Core requests cancellation of opened
non-terminal settlements, expires unopened route agreements, and returns the
unified view.

If funds moved, do not report cancellation from intent alone. Trust the
returned payment and failure state. A pending World ID challenge may remain
visible until expiry but cannot resume a cancelled payment.
