> For the complete documentation index, see [llms.txt](https://agilspot-pay.gitbook.io/api-finance-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://agilspot-pay.gitbook.io/api-finance-hub/api-de-pix/cobranca-com-vencimento-cobv/delete-deletar-uma-cobranca-com-vencimento.md).

# DELETE:: Deletar uma cobrança com vencimento

Usando o DELETE, o QR Code Location será automaticamente desvinculado da cobrança com vencimento.

## Endpoint de request

```
https://sandbox.agilspotpay.financehub.com.br/pix/v1/collection/duedate/{transactionId}
```

## Exemplo com as principais linguagem

Retorno em JSON com os dados do cadastro.

{% tabs %}
{% tab title="cPHP" %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://sandbox.agilspotpay.financehub.com.br/pix/v1/collection/duedate/{transactionId}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "accept: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
```

{% endtab %}

{% tab title="cURL" %}

```shell
curl --request DELETE \
     --url https://sandbox.agilspotpay.financehub.com.br/pix/v1/collection/duedate/{transactionId} \
     --header 'accept: application/json'
```

{% endtab %}

{% tab title="NodeJs Axios" %}

```jsx
const axios = require('axios');

const options = {
  method: 'DELETE',
  url: 'https://sandbox.agilspotpay.financehub.com.br/pix/v1/collection/duedate/{transactionId}',
  headers: {accept: 'application/json'}
};

axios
  .request(options)
  .then(function (response) {
    console.log(response.data);
  })
  .catch(function (error) {
    console.error(error);
  });
```

{% endtab %}
{% endtabs %}

## **Modelo de retorno&#x20;**<mark style="color:green;">**200 OK**</mark>

```json
{
  "transactionId": 45854857,
  "status": 200,
  "message": "success"
}
```

## **Modelo de retorno&#x20;**<mark style="color:red;">**400 Error**</mark>

```json
400 - Value Cannot Be Null. (Parameter 'Source')
{
  "errorCode": "DE001",
  "description": "Value cannot be null. (Parameter 'source')"
}
```
