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

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.dintero.com/feedback

```json
{
  "path": "/docs/webhooks",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Webhooks

> Receive real-time event notifications from Dintero by subscribing to webhooks via API or Backoffice for transactions, settlements, and other platform events.

## What is Webhooks

A webhook (also called a web callback or HTTP push API) is a way for an app to provide other applications with real-time information. A webhook delivers data to other applications as it happens, meaning you get data immediately.

## Setup Webhooks via API

Read more about how to setup webhooks subscription
here: [Webhooks Subscriptions](/api.html#tag/subscriptions)

## Setup Webhooks via Backoffice

You can setup Webhooks via Dintero Backoffice under `Settings` --> `Webhooks`.

## Verify event signature

You can verify that the request received originated from Dintero by creating
the subscription with `HMAC-SHA1` secret set.

The request sent to your subscription url will then include a `event-signature`
header that you can verify using the secret used when the subscription was
created

### Example code

```typescript theme={null}
const verifyEventSignature = (req, secret) => {
    const eventSignature = req.headers["event-signature"];
    const calculatedEventSignature = crypto
        .createHmac("sha1", Buffer.from(secret))
        .update(JSON.stringify(req.body))
        .digest("hex");
    assert.ok(eventSignature === calculatedEventSignature);
};
```
