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

# Event ingestion

> Send payment provider events to Clausum with clm_wh_* webhook keys

Ingest lets you **push** events from your PSP, acquirer, or middleware into Clausum for enrichment, audit, and optional assess triggers — complementary to [real-time assess](/guides/realtime-assessment) (which you call at checkout).

## When to use ingest vs assess

| Pattern                      | Use                                                                                          |
| ---------------------------- | -------------------------------------------------------------------------------------------- |
| **Assess at checkout**       | `POST /api/v1/assess` with `clm_sk_*` — decision before capture                              |
| **Post-hoc provider events** | `POST /api/webhooks/ingest` with `clm_wh_*` — chargebacks, settlements, async updates        |
| **Stripe native**            | `POST /api/webhooks/stripe` — [Stripe adapter](/guides/stripe-webhooks) (signature verified) |

Assess does **not** replace ingest for full transaction lifecycle; many merchants use **both**.

## Create an ingest key

1. **Dashboard → Conexiones → Entrada (webhooks)**
2. Create **Webhook ingest key** → prefix `clm_wh_*`
3. Store the secret (shown once)

<Warning>
  Ingest keys (`clm_wh_*`) are **not** partner secret keys (`clm_sk_*`). Using the wrong key returns `401`.
</Warning>

## Ingest endpoint

```
POST https://dashboard.clausum.ai/api/webhooks/ingest
Authorization: Bearer clm_wh_YOUR_KEY
Content-Type: application/json
```

### Example payload

```json theme={null}
{
  "event_type": "payment.captured",
  "external_id": "pi_3Nx...",
  "amount": 4500,
  "currency": "USD",
  "customer_email": "buyer@example.com",
  "occurred_at": "2026-06-28T12:00:00Z",
  "metadata": {
    "provider": "custom_psp"
  }
}
```

Clausum normalizes known fields and attaches the event to your organization scope.

## Security

* HTTPS only in production
* Rotate ingest keys from Conexiones if compromised
* Do not expose `clm_wh_*` in browser code — server-side only

## Monitor

**Conexiones → Monitor** shows recent partner API activity. For **outbound** deliveries *from* Clausum to your servers, use the delivery log on the **Entrada (webhooks)** tab.

## Related

* [Receiving webhooks](/guides/receiving-webhooks) — events **from** Clausum to you
* [Stripe webhooks](/guides/stripe-webhooks) — first-class Stripe inbound
* [Architecture](/concepts/architecture) — data flow overview
