# Webhook receiver sample

Minimal HTTPS-ready HTTP server that verifies Bex outbound webhooks
(Standard Webhooks) and records accepted `webhook-id` values on disk.

## Download

```bash
curl -fsSLO https://bex.co/examples/webhook-receiver-latest.zip
curl -fsSLO https://bex.co/examples/webhook-receiver-latest.zip.sha256
shasum -a 256 -c webhook-receiver-latest.zip.sha256
unzip webhook-receiver-latest.zip
cd webhook-receiver
```

## Run

```bash
export WEBHOOK_SECRET='whsec_…'   # from POST /v1/webhooks create response
node server.mjs
```

Point your endpoint URL at this process (or a tunnel) after registration.
See [Outbound webhooks](/docs/platform/webhooks) for the registration contract.

Individual source files remain at `/examples/webhook-receiver/` for inspection;
prefer the zip for a complete project.
