# PACTH:: Desvincular cobrança com vencimento de um BRCode Location

## Endpoint de request

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

## 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}/unlink",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  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 PATCH \
     --url https://sandbox.agilspotpay.financehub.com.br/pix/v1/collection/duedate/{transactionId}/unlink \
     --header 'accept: application/json'
```

{% endtab %}

{% tab title="NodeJs Axios" %}

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

const options = {
  method: 'PATCH',
  url: 'https://sandbox.agilspotpay.financehub.com.br/pix/v1/collection/duedate/{transactionId}/unlink',
  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
{
  "clientRequestId": "kk6g232xel65a0daee4dd13kk9189382",
  "status": "ACTIVE",
  "lastUpdateTimestamp": "2022-03-21T16:43:54.4223057+00:00",
  "entity": "PixCollectionDueDate",
  "pactualId": "f7352171-e983-4d91-8073-c2e513b83ce6",
  "createTimestamp": "2022-03-21T14:27:58.2106288+00:00",
  "body": {
    "payerQuestion": null,
    "additionalInformation": null,
    "key": "testepix@agilspotpay.com.br",
    "amount": {
      "original": 15.63
    },
    "debtor": {
      "name": "Fulano de Tal",
      "cpf": null,
      "cnpj": "33188542046"
    },
    "calendar": {
      "expiration": 86400
    }
  }
}
```

## **Modelo de retorno&#x20;**<mark style="color:red;">**404 Not Found**</mark>

```json
404 - Não Foram Encontrados Dados Para A Transação Informada
{
  "message": "Não foram encontrados dados para a transação informada.",
  "errorCode": "404"
}
```
