> For the complete documentation index, see [llms.txt](https://docs.tip4serv.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tip4serv.com/webhooks-developers-only/how-do-webhooks-work.md).

# How do webhooks work?

Designed for developers, custom webhooks allow your application or web server to be notified in real time when an event occurs (payment, subscription, expiration, etc.).

Instead of constantly polling the API, you automatically receive an **HTTP POST** request containing a **JSON payload** describing the event.

With webhooks, you can for example:

* Automatically grant items/roles after a successful payment
* Remove access when a subscription expires
* Send a message on a Discord server
* Trigger your own custom business logic

***

### How it works

1. You set up an **HTTP endpoint** (URL) in your application.
2. When an event occurs, our system sends a **payload** to this URL.
3. Your server must respond with a **2xx HTTP code** to confirm receipt.
4. You process the data as needed (database, integrations, logs, etc.).

***

### Example events

* `payment.success` → A payment was successfully completed
* `payment.failed` → A payment attempt failed
* `payment.refund` → A payment was refunded
* `subscription.created` → A new subscription was created
* `subscription.renewed` → A subscription was renewed
* `subscription.expired` → A subscription expired
