# Delete Contract Related Files

- Sandbox: `DELETE https://sandbox.payme.io/api/payment-contracts/CONT{GUID}/invoices/`
- Production: `DELETE https://live.payme.io/api/payment-contracts/CONT{GUID}/invoices/`

## Credentials

No credentials are documented for this endpoint.

Add /INV{GUID} to the end of the URL to delete a document.
Delete a contract related file.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `GUID` | path | string | yes | Doc ID |

## Code samples

### curl

```bash
curl -X DELETE 'https://sandbox.payme.io/api/payment-contracts/CONT<GUID>/invoices/'
```

### Node.js

```javascript
const response = await fetch("https://sandbox.payme.io/api/payment-contracts/CONT<GUID>/invoices/", {
  method: "DELETE",
});

console.log(await response.text());
```

### Python

```python
import requests

response = requests.delete(
    "https://sandbox.payme.io/api/payment-contracts/CONT<GUID>/invoices/",
)

print(response.text)
```

### PHP

```php
<?php

$ch = curl_init('https://sandbox.payme.io/api/payment-contracts/CONT<GUID>/invoices/');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_RETURNTRANSFER => true,
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
```

## Responses

### 200 — OK (success)
