> 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-reference/deposits-api/automatic-pix/cancel-an-enrollment.md).

# Cancel an enrollment

## Cancel an Enrollment

> This endpoint allows you to cancel an existing enrollment.\
> \
> This uses the same API credentials as the deposit endpoint.<br>

```json
{"openapi":"3.0.1","info":{"title":"OneKey Payments API","version":"1.0.0"},"servers":[{"url":"https://api-stg.onekeypayments.com","description":"Staging Server"}],"paths":{"/v3/enrollments/{enrollment_id}/":{"delete":{"summary":"Cancel an Enrollment","operationId":"cancelEnrollment","description":"This endpoint allows you to cancel an existing enrollment.\n\nThis uses the same API credentials as the deposit endpoint.\n","tags":["Enrollments"],"parameters":[{"name":"enrollment_id","in":"path","description":"OKP enrollment_id. It is obtained when creating a new enrollment.","required":true,"schema":{"type":"integer"}},{"name":"X-Login","in":"header","description":"Merchant X-Login API Key.","required":true,"schema":{"type":"string"}},{"name":"X-Date","in":"header","description":"ISO8601 Datetime with Timezone: yyyy-MM-dd'T'HH:mm:ssZ","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Authorization control hash.","required":true,"schema":{"type":"string"}},{"name":"X-Idempotency-Key","in":"header","description":"Unique idempotency key.","required":true,"schema":{"type":"string"}},{"name":"Content-Type","in":"header","description":"Content type of the request.","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"Enrollment cancelled successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"enrollment_id":{"type":"integer","description":"The ID of the cancelled enrollment."},"status":{"type":"string","description":"The new status of the enrollment."}}}}}}}}}}}
```
