> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://brocard.crisp.help/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Webhooks

### What are webhooks

A webhook is a mechanism for notifying about events happening in a system through callback functions. When an event occurs, the server sends an HTTP request to the URL provided by the client to receive webhooks. For example, events can include creating a new payment, changing its status or amount.

### How to activate webhooks

To activate the feature, the company owner needs to go to the [page](https://private.mybrocard.com/profile/api/webhooks) for configuring webhooks, specify the URL to which the webhooks will be sent, and activate them.

### How webhooks work

When an event is created in the system, a POST request with the body of the object in JSON format is sent to the specified URL in the settings.

At the moment, webhooks are triggered on the following events:

- When a payment is created
- When the payment status and amount are changed
- When a refund is created

You can view the structure of webhooks on the [page](https://private.mybrocard.com/docs#webhooks-beta) of the API documentation.
You can also view the logs of webhook sending on the corresponding [page](https://private.mybrocard.com/profile/logs/webhooks) in the Logs section.

|| If the system does not receive a response with an HTTP code of `2xx` when sending a webhook, it will be sent again.
|| If a webhook fails to be sent five times in a row, the system will deactivate the webhooks and send a notification to the company owner's email.
|| Should you have any issues, questions or observations regarding this article, please contact our support team.