> For the complete documentation index, see [llms.txt](https://docs.lid.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lid.pro/es/agents/webhooks.md).

# Webhooks y eventos

Los cinco eventos de webhook de Lid, los tres encabezados de firma, y cómo verificar una entrega con HMAC-SHA256.

Lid llama a una URL tuya cuando pasa algo. Registra la URL con `create_webhook` o en la app en **Ajustes → Desarrollador → Nuevo webhook**. El secreto de firma se muestra una sola vez. Guárdalo.

## Los eventos

| Evento                      | Se dispara cuando                                        |
| --------------------------- | -------------------------------------------------------- |
| `purchase.completed`        | Una venta se liquidó.                                    |
| `prize.claimed`             | Un titular de premio reclamó el premio de un reto.       |
| `conversion.approved`       | Una conversión de campaña pasó la revisión y es pagable. |
| `subscription.created`      | Alguien se suscribió a una membresía.                    |
| `bounty.submission.created` | Alguien participó en uno de tus retos.                   |

## Verificar una entrega

Cada entrega lleva tres encabezados:

```
x-lid-event      · el tipo de evento
x-lid-timestamp  · hora unix de la entrega
x-lid-signature  · sha256=HMAC_SHA256(secreto, timestamp + '.' + body)
```

Recalcula el HMAC sobre `timestamp + '.' + body crudo` con tu secreto y compara. Rechaza si no coincide o si el timestamp es viejo.

## Cuando una entrega no llega

`webhook_deliveries` lista los intentos recientes de un endpoint con el código de estado y el error. Es el primer lugar donde mirar cuando Lid no te está llamando.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.lid.pro/es/agents/webhooks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
