> For the complete documentation index, see [llms.txt](https://docs.payvalida.com/api-cashout/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payvalida.com/api-cashout/api-cashout-en/delete/delete-operation.md).

# Delete Operation

## Delete Operation

<mark style="color:red;">`DELETE`</mark> `https://api.payvalida.com/cashout/v1/operation/{merchant}/{operation}`

`URL Sandbox: https://api-test.payvalida.com/v1/operation`**`/{merchant}/{operation}`**

This method allows to change the status of an operation to CANCELADO (CANCELLED), meaning that the operation won't be available to be executed. Only PENDIENTE (PENDING) operations are allowed to be cancelled.

#### Path Parameters

| Name      | Type   | Description                                                          |
| --------- | ------ | -------------------------------------------------------------------- |
| merchant  | string | Commerce/merchant that owns the operation (Max 30 characters).       |
| operation | string | Operation ID generated by the commerce/merchant (Max 30 characters). |

#### Request Body

| Name     | Type   | Description                                                                            |
| -------- | ------ | -------------------------------------------------------------------------------------- |
| checksum | string | <p>Checksum encoded in SHA512<br>(merchant+operation+FIXED\_HASH) (512 caracteres)</p> |
| documet  | number | ID of the end user that executes the operation (Max 20 characters).                    |

{% tabs %}
{% tab title="200 Returns a JSON following this structure:" %}

```
{  
   "code":"0000",
   “text”:”OK”,
   "data":{
        "amount": "5000",
        "transactionCost": "2000",
        "currency": "COP",
        "description": "1001007878",
        "otp": "379133",
        "operation": "909192",
        "status": "CANCELADA",
        "payvalidaCode": "507"
    }
}
```

{% endtab %}
{% endtabs %}

## Response data

**code:** Code of the result, "0000" indicates success, any other indicates an error&#x20;

**text:** Contains the message associated with the **code** that was sent.&#x20;

**data:** Contains the transaction data (for successful results)&#x20;

* **amount:** Transaction amount&#x20;
* **transactionCost:** The cost the user assumes for executing the transaction&#x20;
* **currency:** Registered currency for the cashout operation&#x20;
* **description:** Description of the operation&#x20;
* **document:** Identification number&#x20;
* **otp:** Generated OTP for the operation&#x20;
* **operation:** Operation ID, generated by the commerce/merchant&#x20;
* **expire:** Expiration date of the operation&#x20;
* **status:** Status of the operation&#x20;
* **payvalidaCode:** Operation ID in Payvalida&#x20;
