<!-- ZenPays documentation · https://docs.zenpayz.com/docs/reference/objects/webhook-config -->

# The WebhookConfig object

Configuration for a webhook endpoint. Webhooks allow you to receive real-time notifications about events in your ZenPays account.

## Fields

<ParamTable
  label="Field"
  rows={[
    { name: "id", type: "string", required: true, desc: "Unique identifier for the webhook" },
    { name: "url", type: "string", required: true, desc: "URL to receive webhook notifications" },
    { name: "events", type: "string[]", required: true, desc: "Event types this webhook subscribes to" },
    { name: "secret", type: "string", required: false, desc: "Secret for verifying webhook signatures" },
    { name: "isActive", type: "boolean", required: true, desc: "Whether the webhook is currently active" },
    { name: "failureCount", type: "number", required: false, desc: "Number of consecutive delivery failures" },
    { name: "lastDeliveryAt", type: "string", required: false, desc: "ISO 8601 timestamp of the last successful delivery" },
    { name: "createdAt", type: "string", required: true, desc: "ISO 8601 timestamp when the webhook was created" },
    { name: "updatedAt", type: "string", required: true, desc: "ISO 8601 timestamp when the webhook was last updated" },
  ]}
/>

## Example

```json
{
  "id": "obj_1a2b3c",
  "url": "string",
  "events": [],
  "secret": "string",
  "isActive": false,
  "failureCount": 1,
  "lastDeliveryAt": "2026-01-15T09:30:00Z",
  "createdAt": "2026-01-15T09:30:00Z",
  "updatedAt": "2026-01-15T09:30:00Z"
}
```
