> For the complete documentation index, see [llms.txt](https://apidocs.onekeypayments.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.onekeypayments.com/api-documentation/automatic-pix-api/cancel-enrollment-endpoint.md).

# Cancel Enrollment Endpoint

### Cancelling an Enrollment

This endpoint allows you to cancel an existing enrollment.\
\
This uses the same API credentials as the deposit endpoint.\
\ <mark style="color:$danger;">`DELETE`</mark> `https://api-stg.onekeypayments.com/v3/enrollments/{enrollment_id}/`

#### Path Parameters

| Name         | Type    | Description                                                        |
| ------------ | ------- | ------------------------------------------------------------------ |
| enrollmentId | integer | OKP enrollment\_id. It is obtained when creating a new enrollment. |

#### Headers

| Name              | Type   | Description                                                                    |
| ----------------- | ------ | ------------------------------------------------------------------------------ |
| Content-Type      | string | `application/json`                                                             |
| X-Date            | string | <p>ISO8601 Datetime with Timezone: <br><code>yyyy-MM-dd'T'HH:mm:ssZ</code></p> |
| X-Login           | string | Merchant X-Login API Key                                                       |
| Authorization     | string | Authorization control hash                                                     |
| X-Idempotency-Key | string | Unique idempotency key                                                         |

### Example Response

```json
{
    "enrollment_id": 36,
    "status": "CANCELLED"
}
```
