---
title: "How webhooks work"
description: "How Amplia Reg webhooks work: which orders trigger notifications, the path of a notification, delivery, retries, ordering and duplicates."
canonical: "https://docs.lacunasoftware.com/en-us/articles/amplia-reg/integration/webhooks/how-it-works"
locale: "en"
product: "Amplia Reg"
last_updated: "2026-11-17"
---

# How webhooks work

A webhook is a URL of your application. Amplia Reg calls this URL when something happens to an order that your application created. For
example, Amplia Reg sends a `POST` to this URL when the agent approves the order or when the certificate is issued. As a result, your
application knows about each status change and does not have to query the order again and again.

## The path of a notification

```text
  Agent                Amplia Reg                        Your application
     |                     |                                   |
     |-- approves order -->|                                   |
     |                     |-- POST https://your-url --------->|  1. Checks the authentication header
     |                     |   { "type": ..., ... }            |  2. Responds 2xx
     |                     |<--------------------- 200 OK -----|  3. Processes the event
```

1. An order created by your application changes status, because of an agent, the holder or Amplia Reg itself.
2. If the webhook of the application that created the order is enabled at that moment, Amplia Reg records a notification for the
   application.
3. Amplia Reg sends the notification in the background. The notification is a `POST` with a JSON body to the registered URL, with the
   secret in the authentication header.
4. Your application responds. A `2xx` response ends the delivery.

## Which orders trigger notifications

Only the orders that the application created trigger notifications to it. Orders that an agent created in the control panel, or that a
different application created, do not. Also, the webhook does not notify changes that occurred before you enabled it.

Every status change triggers an `OrderStatusChanged` notification, including the order creation. Video identification orders also trigger
an `OrderVideoIdentificationCompleted` notification when the holder finishes the recording. See the [Event reference](https://docs.lacunasoftware.com/en-us/articles/amplia-reg/integration/webhooks/events).

## Delivery and retries

Any response other than `2xx`, or no response, counts as a failed delivery. When delivery fails, Amplia Reg tries to deliver the
notification again later. The **Webhook notifications** section of the application shows the number of attempts and the
response or the error of the last attempt.

Amplia Reg reads the webhook settings at the time of each delivery. If you disable the webhook before the delivery, the pending
notifications are not delivered.

Retries do not guarantee the delivery. To recover the changes that your application missed, see
[Recover missed changes](https://docs.lacunasoftware.com/en-us/articles/amplia-reg/integration/webhooks#reconcile).

## Ordering and duplicates

Amplia Reg delivers each notification independently, so notifications can arrive out of order, especially after a retry. For example,
the `Issued` notification can arrive before the `WaitingIssue` notification. The `date` field shows when each change occurred.

The same notification can also arrive more than once. If your application processed the notification but the response did not reach
Amplia Reg, the delivery counts as failed. Amplia Reg then sends the notification again.

[Register and receive webhooks](https://docs.lacunasoftware.com/en-us/articles/amplia-reg/integration/webhooks#receive) shows how to handle both cases.

## New values

Lacuna can add new event types, statuses and reasons to Amplia Reg. If your application ignores an unknown `type` and treats an unknown
reason as `Other`, it continues to work after such a change.

## See also

* [Register and receive webhooks](https://docs.lacunasoftware.com/en-us/articles/amplia-reg/integration/webhooks)
* [Event reference](https://docs.lacunasoftware.com/en-us/articles/amplia-reg/integration/webhooks/events)
* [Order statuses](https://docs.lacunasoftware.com/en-us/articles/amplia-reg/issuance#order-statuses)
