# 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.directa24.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 D24 CASHOUTS API login key."},"pass":{"type":"string","maxLength":32,"description":"Your D24 CASHOUTS API pass key."},"cashout_id":{"type":"integer","format":"int64","description":"The ID of the cashout to cancel. It is the one generated by D24 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."}}}}}}}}}}}
```
