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

# Remover item do link

> Remove um item do link de pagamento

O último item de um link não pode ser removido.

Permissão: `payment_link.write` (chave secreta).

## Endpoint

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE https://api.upag.dev/v1/payment-links/d4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70/items/e5f6a7b8-c9d0-4e1f-8a2b-3c4d5e6f7a81 \
    -H "Authorization: Bearer sk_test_your_api_key"
  ```

  ```javascript Node.js SDK theme={null}
  import { Upag } from 'upag';

  const upag = new Upag('sk_test_your_api_key');

  // upag.paymentLinks.deleteItem(paymentLinkId, itemId)
  await upag.paymentLinks.deleteItem(
    'd4e5f6a7-b8c9-4d0e-9f1a-2b3c4d5e6f70',
    'e5f6a7b8-c9d0-4e1f-8a2b-3c4d5e6f7a81',
  );
  ```
</CodeGroup>

<Note>
  Em produção use `https://api.upag.io/v1` com `sk_live_...`.
</Note>

## Parâmetros

<ParamField path="paymentLinkId" type="string (uuid)" required>
  ID do link de pagamento.
</ParamField>

<ParamField path="itemId" type="string (uuid)" required>
  ID do item.
</ParamField>

## Resposta

`204 No Content` — sem corpo em caso de sucesso.

* `404` — `PAYMENT_LINK_NOT_FOUND` ou `PAYMENT_LINK_ITEM_NOT_FOUND`.
* `400` (`PAYMENT_LINK_LAST_ITEM`) — o link precisa manter pelo menos um item. Adicione outro antes de remover.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.