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

# Eliminar webhook

> Elimina un webhook de tu cuenta. Esta acción es irreversible.

<Warning>
  Al eliminar un webhook dejarás de recibir notificaciones para esa URL. La acción no puede deshacerse.
</Warning>

### Path Parameters

<ParamField path="id" type="string" required>
  ID del webhook a eliminar.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.onepay.la/v1/webhooks/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
    -X DELETE \
    -H "Authorization: Bearer sk_test_xxx"
  ```

  ```javascript JavaScript theme={null}
  const id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890';

  await fetch(`https://api.onepay.la/v1/webhooks/${id}`, {
    method: 'DELETE',
    headers: {
      'Authorization': 'Bearer sk_test_xxx'
    }
  });
  ```

  ```python Python theme={null}
  import requests

  webhook_id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'

  requests.delete(
      f'https://api.onepay.la/v1/webhooks/{webhook_id}',
      headers={'Authorization': 'Bearer sk_test_xxx'}
  )
  ```

  ```php PHP theme={null}
  <?php
  $id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890';
  $curl = curl_init();

  curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.onepay.la/v1/webhooks/{$id}",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => [
      "Authorization: Bearer sk_test_xxx"
    ]
  ]);

  curl_exec($curl);
  ?>
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "message": "Webhook eliminado correctamente."
  }
  ```

  ```json 404 theme={null}
  {
    "message": "Webhook no encontrado.",
    "code": 10004,
    "code_name": "not_found"
  }
  ```
</ResponseExample>
