# Cancel a payout request

Cancels a payout request. The requester's own act, so it takes the ordinary write door rather than the admin one. No body. A request that was approved and then failed to settle is cancelled here, because there is no failed state on a payout — what failed to settle is still owed.

Access class: `workspace`.

## Endpoint

`POST /v1/accounting/payouts/{id}/cancel`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| id | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {},
  "params": {
    ":id": "string"
  },
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "availableAtRequestMinor": 1,
    "bankTransactionId": 1,
    "createdAt": "string",
    "currency": "string",
    "dealId": 1,
    "decidedAt": "string",
    "decidedBy": "string",
    "decisionReason": "string",
    "detail": {},
    "id": 1,
    "notes": "string",
    "paidAt": "string",
    "requestedAmountMinor": 1,
    "requestedAt": "string",
    "requestedBy": "string",
    "splitId": 1,
    "status": "string",
    "updatedAt": "string"
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
