> 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/cashouts-api/manage-cashouts/cancel-a-cashout.md).

# Cancel a cashout

## Cancel a cashout

> This API allows you to cancel a cashout request. Only for cashouts in PENDING state.

```json
{"openapi":"3.0.0","info":{"title":"Cashout API","version":"v3"},"servers":[{"url":"https://api-stg.onekeypayments.com/v3","description":"Staging server"}],"paths":{"/cashout/cancel":{"delete":{"summary":"Cancel a cashout","description":"This API allows you to cancel a cashout request. Only for cashouts in PENDING state.","operationId":"cancelCashout","tags":["Cashout"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["login","pass","cashout_id","external_id"],"properties":{"login":{"type":"string","maxLength":32,"description":"Your onekeypayments CASHOUTS API login key."},"pass":{"type":"string","maxLength":32,"description":"Your onekeypayments CASHOUTS API pass key."},"cashout_id":{"type":"integer","format":"int64","description":"The ID of the cashout to cancel. It is the one generated by onekeypayments when the cashout was created."},"external_id":{"type":"string","description":"The external ID of the cashout to cancel. It is the one you sent when generating the cashout."}}}}}},"parameters":[{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string","default":"application/json"},"description":"Media type of the request."},{"name":"Payload-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"Control Signature. Calculated by hashing the JSON payload of the request using HMAC256 and your secret key (API Signature) to encrypt it.\n"}],"responses":{"200":{"description":"Cashout cancelled successfully","content":{"application/json":{"schema":{"type":"object","properties":{"cashout_status":{"type":"integer","description":"New status code of the cashout."},"cashout_status_description":{"type":"string","description":"Description of the new status of the cashout."}}}}}},"412":{"description":"Error while cancelling the cashout. It can be cancelled only if its status is Pending. (Also used for \"Cashout not found\" or other \"Invalid status transition\" errors as per PDF examples)\n","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","description":"Error code."},"message":{"type":"string","description":"Error message."}}}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://apidocs.onekeypayments.com/api-reference/cashouts-api/manage-cashouts/cancel-a-cashout.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
