> ## 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

> Request cancellation of a merchant-owned payment before funding or where the current state permits it.

```text theme={null}
POST /v1/partner/payments/:paymentId/cancel
```

**Authentication:** signed Partner API request.

## Path parameters

| Parameter | Required | Description |
| - | - | - |
| `paymentId` | Yes | Merchant-owned payment to cancel. |

## Request body

```json theme={null}
{"reason":"customer_changed_mind"}
```

`reason` is optional and has a 500-character maximum.

## Response

```json theme={null}
{
  "payment_id": "pay_...",
  "status": "cancelled",
  "terminal": true,
  "successful": false,
  "funds_moved": false,
  "next_action": {"type":"none","instruction":"No action is required.","poll_after_seconds":null},
  "payment_instruction": null
}
```

Cancellation depends on the current settlement state. Do not tell an end user
that cancellation succeeded until the returned or subsequently read payment is
terminal with `status: "cancelled"`.
