Normalize Webhook Payload
growsurf_webhook_normalizeValidate and normalize GrowSurf webhook payloads, then generate a best-effort idempotency key to dedupe events.
Instructions
Validate/normalize a GrowSurf webhook payload and generate a best-effort idempotency key for dedupe.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| payload | Yes | JSON value to validate. A valid webhook envelope is an object with `event`, `createdAt`, and `data`. Other JSON values return `ok: false`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | Whether the payload is a valid GrowSurf webhook envelope. | |
| error | No | Why the payload failed validation. Present only when `ok` is `false`. | |
| envelope | No | The normalized webhook envelope. Present only when `ok` is `true`. | |
| idempotencyKey | No | A deterministic key for ignoring duplicate deliveries. Present only when `ok` is `true`. |