---
title: Event types
description: Reference for IDCloud webhook event types — process completed, failed, and status change payloads.
canonical: https://developer.unico.io/dual-api/developers/webhooks-and-events/event-types
locale: en
generated_by: markdown-export
---

Webhook payloads describe a process state transition. This page documents the payload schema and the full enumeration of `lastEvent` values.

### Payload schema

| Field | Type | Description |
|---|---|---|
| `processId` | `string` (UUID) | ID of the transaction. |
| `state` | `string` | Current state of the transaction. Currently: `PROCESS_STATE_FINISHED`. |
| `flow` | `string` | Flow that was executed for this transaction (e.g., `id`, `idtoken`). |
| `lastEvent` | `string` | Last event of the transaction. **Returned only when the process expired before the user completed the flow.** |
| `lastEventDescription` | `string` | Human-readable description of `lastEvent`. **Returned only when the process expired before the user completed the flow.** |

:::note[Status vocabulary]
The `state` field in webhook payloads uses the `PROCESS_STATE_*` prefix. This is a distinct vocabulary from the `result` and `status` fields returned by the GetProcess endpoint, which use `PROCESS_RESULT_*`. Do not treat them as interchangeable.
:::

### Example payload

#### Finished — successful

```json
{
  "processId": "8263a268-5388-492a-bca2-28e1ff4a69f0",
  "state": "PROCESS_STATE_FINISHED",
  "flow": "id"
}
```

#### Finished — expired

```json
{
  "processId": "8263a268-5388-492a-bca2-28e1ff4a69f0",
  "state": "PROCESS_STATE_FINISHED",
  "flow": "id",
  "lastEvent": "EVENT_TYPE_SESSION_ENDED",
  "lastEventDescription": "Session ended by timeout or by new session created"
}
```

### lastEvent enumeration

The full list of values that may appear in `lastEvent`:

| Event | Description |
|---|---|
| `EVENT_TYPE_PROCESS_CREATED` | Process created |
| `EVENT_TYPE_QR_CODE_READ` | QR code was read |
| `EVENT_TYPE_PROCESS_STARTED_BY_USER` | Process started by user |
| `EVENT_TYPE_IDENTITY_VALIDATION_STEP_FINISHED` | Identity validation step finished |
| `EVENT_TYPE_DOCUMENT_STEP_STARTED` | Document step has started |
| `EVENT_TYPE_DOCUMENT_PHOTO_CAPTURED` | Photo of the document taken |
| `EVENT_TYPE_DOCUMENT_UPLOADED_FROM_GALLERY` | Document uploaded from gallery |
| `EVENT_TYPE_DOCUMENT_STEP_FINISHED` | Document step finished |
| `EVENT_TYPE_SESSION_ENDED` | Session ended by timeout or by new session created |
| `EVENT_TYPE_ERROR_ON_DOCUMENT_STEP` | Error on document step |

:::secondary[Configurable handling]
The set of events may evolve. Treat the events your endpoint reacts to as **configuration**, not hard-coded constants — that way new events can be enabled without a deploy.
:::

### Reading the full process result

The webhook payload signals that a process finished, but does not include the outcome itself. To retrieve the result — along with capture data, biometric scores, document fields, etc. — call the appropriate **GetProcess** endpoint:

- For visual / Web & Native flows: see [API Reference > Web & Native > GET /v1/process/&#123;id&#125;](/dual-api/developers/api-reference/web-sdk).
- For non-visual / API flows: see [API Reference > API > GET /processes/v1/&#123;id&#125;](/dual-api/developers/api-reference/api).