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

# Verify incoming event

> Validate a signed Luma webhook with webhook.verify(), checking the HMAC signature header and returning a typed, unwrapped event payload.

<Badge color="purple">SDK</Badge> `webhook.verify(params: VerifyWebhookParams): UnwrappedWebhookEvent`

Verifies the webhook signature and parses the event payload.

<RequestExample>
  ```typescript Example theme={null}
  // In your HTTP handler
  const event = webhook.verify({
    body: await req.text(),
    headers: req.headers,
  });
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "type": "guest.updated",
    "data": {
      "user_email": "jane@example.com",
      "event_tickets": [
        {
          "checked_in_at": "2024-06-01T12:00:00Z"
        }
      ]
    }
  }
  ```
</ResponseExample>

### Parameters

<ParamField path="body" type="string | Uint8Array" required>
  Raw request body — do not re-serialize JSON.
</ParamField>

<ParamField path="headers" type="Headers | Record<string, string>" required>
  Request headers including webhook signature headers.
</ParamField>

### Handle an event

```typescript theme={null}
if (event.type === "guest.updated") {
  const checkedIn = event.data.event_tickets.some((t) => t.checked_in_at !== null);
  if (checkedIn) {
    // e.g. send welcome email to event.data.user_email
  }
}
```

<Note>
  Luma has no dedicated check-in webhook. Check-in arrives as `guest.updated` with `event_tickets[].checked_in_at` set. See the [Guest Updated webhook docs](https://docs.luma.com/reference/webhook_guest_updated).
</Note>

### Test it

1. Register an endpoint with `luma.webhooks.create()` and save the secret.
2. Trigger an event on a test calendar (for example, register a guest).
3. In your handler, call `webhook.verify()` and log `event.type`.

Verification errors throw `WebhookSignatureError` — see [Error handling](/error-handling).
