<!-- ZenPays documentation · https://docs.zenpayz.com/docs/guides/webhooks -->

# Webhooks Overview

Receive real-time notifications about payment events.

<Diagram
  slug="webhook-delivery"
  alt="An event occurs, is signed with HMAC-SHA256 over the raw body, and delivered by POST to your URL. A 2xx response completes delivery; anything else is retried up to three times, immediately then roughly 30 and 60 seconds later."
  caption="How webhooks are signed, delivered and retried"
/>

## Creating a Webhook

1. Log in to your **Merchant Dashboard** and navigate to **Developer Tools → Webhooks** tab.

![Webhook configuration page](/img/webhook-page.png)

2. Fill in the **Name** and **Endpoint URL** fields with your server's webhook URL (e.g. `https://your-domain.com/webhooks/zenpays`).

3. Click **Generate** to create a **Webhook Secret**. Copy and store this secret securely on your server — you'll need it to verify webhook signatures.

4. Select the **Events to Listen** to. You can pick individual events or select **All Events** to receive everything.

5. Click **+ Add Webhook** to save.

![Webhook created](/img/create-webhook.png)

6. Your endpoint will appear under **Configured Webhooks**. You can add multiple webhook endpoints to receive events at different URLs.

## Testing Webhooks

To test your webhook integration:

1. Create a webhook on the dashboard (see above).
2. Process a test payment transaction through the checkout flow.
3. Check your server logs to verify the webhook was received with the correct payload and signature.

Delivery attempts and status are visible in the dashboard under each configured webhook endpoint.
