# Cancel an ID Pass

`POST /idpass/cancel`

- Live: `POST https://gdapi.globaldata.net.au/api/v2/idpass/cancel`
- Sandbox: `POST https://sandbox-gdapi.globaldata.net.au/api/v2/idpass/cancel`

Cancel an ID Pass. Only ID Passes with status `new`, `opened`, or `in_progress` can be cancelled.
Terminal statuses (`complete`, `expired`, `failed`, `cancelled`) will return an error.

Please review the full ID Pass documentation here:

[ID Pass documentation](/docs/guides/idpass)

## Refund behaviour

- **Refund:** A cancel request will **refund the fee** if the ID Pass status is still `new` or `opened`
  (no verification steps have been taken).
- **No refund:** If any steps have been taken (for example status is `in_progress` or the user has
  started the flow), **no refund** is issued.

## Request body

The ID of the ID Pass to cancel

| Field | Type | Description |
|-------|------|-------------|
| `id` | string (uuid) | **Required.** The id of the ID Pass to cancel Example: `fe4291ca-d831-4760-96df-c9cb03b3cd95` |

**Sample request**

```json
{
    "id": "fe4291ca-d831-4760-96df-c9cb03b3cd95"
}
```

## Responses

### 200 ID Pass cancelled successfully

Content type: `application/json`

| Field | Type | Description |
|-------|------|-------------|
| `message` | string | A message indicating the result of the request Example: `Ok` |
| `api_reference` | string (uuid) | A unique identifier for this request |
| `id` | string (uuid) | The identifier for this ID Pass |
| `status` | string | The status of the ID Pass after cancellation Enum: `cancelled` Example: `cancelled` |
| `fee_refunded` | boolean | Whether a fee refund was applied (true if no verification steps had been taken and a fee had been charged) Example: `false` |

**Sample response**

```json
{
    "message": "Ok",
    "api_reference": "00000000-0000-0000-0000-000000000000",
    "id": "00000000-0000-0000-0000-000000000000",
    "status": "cancelled",
    "fee_refunded": false
}
```

Standard error responses: 400, 401, 402, 403, 429, 5XX (see [Common error responses](/docs/reference/general/common-error-responses.md))

