---
title: "Events"
description: "A callback URL is used to subscribe to events that occur. When an event occurs, a trigger is sent to the callback URL."
canonical: "https://docs.cm.com/verification/identity-hub/events"
---

# Events

> A callback URL is used to subscribe to events that occur. When an event occurs, a trigger is sent to the callback URL.

Source: https://docs.cm.com/verification/identity-hub/events

A callback URL is used to subscribe to events that occur. When an event occurs, a trigger is sent to the callback URL.

## Event types

Supported event types:

| Type | Description |
| - | - |
| `transaction.state` | The state of the transaction has been updated. |

## Subscribe to events

To subscribe to the events you need to provide the `callbackUrl` in the [Create a transaction](https://docs.cm.com/verification/identity-hub/identify-a-user#create-a-transaction) request body.

## Retrieve status callback

The following information is sent when the state of the transaction changes. Use it as a trigger to retrieve the latest details with the [Get a transaction](https://docs.cm.com/verification/identity-hub/identify-a-user#get-a-transaction) endpoint.

```text title="Request headers"
Authorization: HMAC MIi9ZMyar2v+o7H7LD7oNolO5LrTJaC+8uKvYUGqJvM=
Content-Type: application/json
```

The callback request is signed, allowing you to verify the authenticity and integrity of the request. The signature is calculated using HMAC-SHA256, with the request body as the message and the client secret as the secret key. The signature is added to the `Authorization` header, and can be verified by repeating this step and comparing the value.

```json title="Request body"
{
    "id": "58128784-9e8d-4424-a89d-08bfe273381c",
    "type": "transaction.state",
    "created": "2026-01-01T00:00:00+00:00",
    "transaction": {
        "id": "0662f56b-13e0-4b64-b7ed-7ca75516fb85",
        "state": "success",
        "method": "idin",
        "methodType": "full"
    }
}
```

| Property | Description |
| - | - |
| id | Unique identifier of the event. In UUID format. |
| type | The event type. See [Event types](#event-types). |
| created | The time the event was created, in ISO 8601 format. |
| transaction.id | Unique identifier of the transaction. In UUID format. |
| transaction.state | Current state of the transaction. Possible values: `created`, `started`, `success`, `failed`. |
| transaction.method | The identification method selected by the end-user. `null` until the end-user has selected a method. |
| transaction.methodType | The specific type of the selected method, when a method offers more than one. For example `basic` or `full` for ID Scan. `null` when not applicable. |

**Response**

The status code should be in the 2xx range (between 200 and 300), the response body doesn't matter as it's ignored. In case of status code 5xx, the callback will be retried several times.
