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

# Webhooks

> Orbit incoming webhooks: event paths, payloads, and response data.

The Orbit plugin handles incoming webhooks. Point your provider’s subscription URL at your Corsair HTTP handler (see [Overview](/plugins/orbit/overview) for setup context and the exact URL shape).

> [!NOTE]
>
> **New to Corsair?** See [webhooks](/concepts/webhooks) and [hooks](/concepts/hooks).

## Webhook map

* `events`
  * `delivery` (`events.delivery`)

## HTTP handler setup

```ts app/api/webhook/route.ts theme={null}
import { processWebhook } from "corsair";
import { corsair } from "@/server/corsair";

export async function POST(request: Request) {
    const headers = Object.fromEntries(request.headers);
    const body = await request.json();
    const result = await processWebhook(corsair, headers, body);
    return result.response;
}
```

## Events

## Events

### Delivery

`events.delivery`

A signed Orbit event delivery

**Payload**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | — |
| `type` | `string` | No | — |
| `created` | `string` | No | — |
| `test` | `boolean` | No | — |
| `data` | `object` | No | — |

> **data full type**
>
> ```ts theme={null}
> {
> }
> ```

> **Response data full type**
>
> ```ts theme={null}
> {
> }
> ```

**`webhookHooks` example**

```ts theme={null}
orbit({
    webhookHooks: {
        events: {
            delivery: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})
```

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.