> For the complete documentation index, see [llms.txt](https://wiki.tribute.tg/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.tribute.tg/ru/api-dokumentaciya/vebkhuki.md).

# Вебхуки

Вебхуки для уведомления о событиях в системе.

**Настройка:**

1. Перейдите в Дэшборд автора → Настройки (меню три точки) → Раздел API-ключи
2. Сгенерируйте API-ключ, если ещё не сделали это
3. Укажите URL вашего вебхука в настройках вебхуков

**Проверка подписи:** Каждый запрос содержит заголовок `trbt-signature` с HMAC-SHA256 подписью тела запроса, подписанного вашим API-ключом.

**Повторные попытки:** При ошибке доставки система повторяет попытки с экспоненциальной задержкой в течение \~24 часов: 5мин, 15мин, 30мин, 1ч, 2ч, 4ч, 8ч, 8ч.

**Тип подписки (payload.type) в событиях подписок:**

* `regular` — обычная платная подписка (оформление обычной подписки или продление)
* `gift` — подарочная подписка (покупка подарка)
* `trial` — пробная подписка (активация)

**Переходы типов:** При продлении `gift` или `trial` следующая подписка становится `regular` и это отражается в событии `renewed_subscription`.

{% openapi-webhook spec="api-ru" name="newSubscription" method="post" %}
[api-ru](https://tribute.tg/api/v1/openapi/ru)
{% endopenapi-webhook %}

{% openapi-webhook spec="api-ru" name="cancelledSubscription" method="post" %}
[api-ru](https://tribute.tg/api/v1/openapi/ru)
{% endopenapi-webhook %}

{% openapi-webhook spec="api-ru" name="renewedSubscription" method="post" %}
[api-ru](https://tribute.tg/api/v1/openapi/ru)
{% endopenapi-webhook %}

{% openapi-webhook spec="api-ru" name="physicalOrderCreated" method="post" %}
[api-ru](https://tribute.tg/api/v1/openapi/ru)
{% endopenapi-webhook %}

{% openapi-webhook spec="api-ru" name="physicalOrderShipped" method="post" %}
[api-ru](https://tribute.tg/api/v1/openapi/ru)
{% endopenapi-webhook %}

{% openapi-webhook spec="api-ru" name="physicalOrderCanceled" method="post" %}
[api-ru](https://tribute.tg/api/v1/openapi/ru)
{% endopenapi-webhook %}

{% openapi-webhook spec="api-ru" name="newDonation" method="post" %}
[api-ru](https://tribute.tg/api/v1/openapi/ru)
{% endopenapi-webhook %}

{% openapi-webhook spec="api-ru" name="recurrentDonation" method="post" %}
[api-ru](https://tribute.tg/api/v1/openapi/ru)
{% endopenapi-webhook %}

{% openapi-webhook spec="api-ru" name="cancelledDonation" method="post" %}
[api-ru](https://tribute.tg/api/v1/openapi/ru)
{% endopenapi-webhook %}

{% openapi-webhook spec="api-ru" name="newDigitalProduct" method="post" %}
[api-ru](https://tribute.tg/api/v1/openapi/ru)
{% endopenapi-webhook %}

{% openapi-webhook spec="api-ru" name="digitalProductRefund" method="post" %}
[api-ru](https://tribute.tg/api/v1/openapi/ru)
{% endopenapi-webhook %}


---

# 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://wiki.tribute.tg/ru/api-dokumentaciya/vebkhuki.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.
