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

# First webhook

> Register a webhook in the Trio App and start receiving event notifications.

Webhooks let Trio notify your application whenever an event occurs, so you do not need to poll the API for updates. This page registers your first webhook in the Trio App. You need an HTTPS endpoint that is publicly reachable and accepts HTTP `POST` requests.

**1. Open Settings**

In the lower-left menu, click the **Settings** icon.

![Settings icon in the lower-left menu](https://mintcdn.com/trio-372e8dab/-nKZgppWVUd8nree/images/image-1.png?fit=max\&auto=format\&n=-nKZgppWVUd8nree\&q=85\&s=9758d3181447d8cd2f6140f4f471afaf)

**2. Go to Webhooks**

In the dropdown menu, select **Webhooks**.

![Webhooks option in the Settings menu](https://mintcdn.com/trio-372e8dab/-nKZgppWVUd8nree/images/image-2.png?fit=max\&auto=format\&n=-nKZgppWVUd8nree\&q=85\&s=bb4c92ecb9ffd5ff21c2baafadc17a67)

**3. Create a webhook**

Click **Create Webhook**.

![Create Webhook button](https://mintcdn.com/trio-372e8dab/-nKZgppWVUd8nree/images/image-3.png?fit=max\&auto=format\&n=-nKZgppWVUd8nree\&q=85\&s=6681cbcf8dd1acd0e17ae59ada7d0e67)

**4. Fill in the Notification URL**

This is the HTTPS endpoint where Trio delivers webhook notifications. Make sure it is publicly accessible and accepts HTTP `POST` requests.

![Notification URL field](https://mintcdn.com/trio-372e8dab/-nKZgppWVUd8nree/images/image-4.png?fit=max\&auto=format\&n=-nKZgppWVUd8nree\&q=85\&s=95c0c5201b9059b7134561befffe3816)

**5. Select an Entity (optional)**

Leave the field empty to receive events from **all entities** in your account, or select an entity to receive only the events related to it.

![Entity selector](https://mintcdn.com/trio-372e8dab/-nKZgppWVUd8nree/images/image-5.png?fit=max\&auto=format\&n=-nKZgppWVUd8nree\&q=85\&s=dbfe0767ea70c32c7cb4822a67dbd0e6)

**6. Select a Bank Account (optional)**

After selecting an entity, you can narrow the webhook further to one of its bank accounts. Only events generated by that bank account are delivered.

![Bank account selector](https://mintcdn.com/trio-372e8dab/-nKZgppWVUd8nree/images/image-6.png?fit=max\&auto=format\&n=-nKZgppWVUd8nree\&q=85\&s=5a4251e36445b181cfb0ef597baa0452)

**7. Select the events**

Choose the event types your application should receive.

![Event selection](https://mintcdn.com/trio-372e8dab/-nKZgppWVUd8nree/images/image-7.png?fit=max\&auto=format\&n=-nKZgppWVUd8nree\&q=85\&s=fa8020c6cabf68341119d611f7f0133d)

For most Pix integrations, the recommended events are:

* **Payment Document** (Pix cash-out)
* **Collecting Document** (Pix cash-in)

You can also subscribe to any other events relevant to your integration.

> [!NOTE]
>
> A V2 webhook also carries an `api_version` (`v100` or `v200`) that selects the version of the event payloads it receives; it defaults to `v100`. See the [create webhook API reference](https://docs.trio.com.br/v2/api-reference/banking-api/developers/webhooks/create-webhook.md).

**8. Enter a Secret**

Choose any secret value that only your application knows. Trio uses it to generate a unique signing key for the webhook.

![Secret field](https://mintcdn.com/trio-372e8dab/-nKZgppWVUd8nree/images/image-9.png?fit=max\&auto=format\&n=-nKZgppWVUd8nree\&q=85\&s=d8af364ef14fa8d19ac791c2895cf3c8)

Every delivery includes the `x-webhook-signature` HTTP header with the HMAC-SHA256 signature of the request body. To verify a delivery, compute the HMAC-SHA256 of the received payload with the signing key shown on the webhook details page and compare it with the header. When they match, the request came from Trio and the payload was not modified in transit.

**9. Save the webhook**

Click **Save Webhook**.

![Save Webhook button](https://mintcdn.com/trio-372e8dab/-nKZgppWVUd8nree/images/image-10.png?fit=max\&auto=format\&n=-nKZgppWVUd8nree\&q=85\&s=e7d44926b03b8a0e21b6bbd3cb80a65a)

**10. Save the signing key**

Open the webhook details and store the signing key in a secure location. Your application needs it to verify the signature of every delivery.

![Webhook details with the signing key](https://mintcdn.com/trio-372e8dab/-nKZgppWVUd8nree/images/image-11.png?fit=max\&auto=format\&n=-nKZgppWVUd8nree\&q=85\&s=1a59458772bd6250957e6c5bf6504333)

Your webhook is active and ready to receive notifications.

## Next steps

* [Webhooks](https://docs.trio.com.br/v2/webhooks/introduction.md): how Trio delivers events to your endpoint.
* [Webhook authentication](https://docs.trio.com.br/v2/webhooks/authentication.md): how to verify that a delivery came from Trio.
* [Events](https://docs.trio.com.br/v2/webhooks/events/overview.md): the events you can subscribe to and their payloads.
* [Support](https://docs.trio.com.br/v2/getting_started/support.md): where to ask for help and what to include in a report.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.