> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chargefy.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete a Payment Link

> Remove ou desativa um payment link.

Remove um `payment_link` quando ele ainda não materializou nenhuma `checkout.session`. Se o link já foi usado, a Chargefy desativa automaticamente com `is_active=false` e retorna o objeto completo atualizado.

## Autenticação

Mesmo contrato de [POST /v1/payment-links](/api-reference/payment-links/create): API key da organização com escopo de escrita, ou API key da plataforma com header `Organization`.

## Parâmetros de caminho

<ParamField path="id" type="string" required>
  ID do payment link.
</ParamField>

<RequestExample>
  ```bash cURL theme={}
  curl -X DELETE "https://api.chargefy.io/v1/payment-links/plink_123" \
    -H "Authorization: Bearer {{API_KEY}}"
  ```
</RequestExample>

## Respostas

Quando a row pôde ser removida:

<ResponseExample>
  ```json 200 (deleted) theme={}
  {
    "id": "plink_123",
    "object": "payment_link",
    "deleted": true
  }
  ```

  Quando o link precisava permanecer auditável:

  ```json 200 (deactivated) theme={}
  {
    "id": "plink_123",
    "object": "payment_link",
    "allow_discount_codes": true,
    "cancel_url": null,
    "created_at": "2026-05-16T14:09:27Z",
    "discount": null,
    "is_active": false,
    "label": "Bio Instagram",
    "line_items": [],
    "livemode": true,
    "metadata": {},
    "payment_method_options": {
      "credit_card": {
        "installments": {
          "has_interest": true,
          "max_count": 12
        }
      }
    },
    "require_billing_address": false,
    "require_document": true,
    "require_phone": false,
    "success_url": "https://meusite.com/sucesso",
    "updated_at": "2026-05-16T15:02:10Z",
    "url": "https://pay.chargefy.io/link/9a1bc3..."
  }
  ```
</ResponseExample>

## Webhook

Quando o `DELETE` vira desativação, emite `payment.link.updated` com `data.object.is_active=false` e `data.previous_attributes.is_active=true`. Quando a row é removida de verdade, a resposta direta já confirma `{ deleted: true }`.
