Skip to main content

1. Concepts

What a webhook alert does

A webhook alert sends an HTTP POST request to an endpoint whenever a subscribed event happens in Zenskar, for example when a customer is created or an invoice is approved.

Event categories and Contracts V3

Webhook events are organized into five categories: Customer, Invoice, Contract, Payment, and Entitlement. Organizations on Contracts V3 can only subscribe to Customer and Payment events. Invoice, Contract, and Entitlement events are not selectable when creating or editing a webhook under Contracts V3.
The event picker in the webhook form does not currently expose every event Zenskar can send. invoice.cancelled and entitlement.expired exist but are not selectable when creating or editing a webhook.

Enabling and disabling a webhook

A webhook can be paused without deleting it, keeping its configuration in place while stopping deliveries until it is resumed.

Verifying a delivery

Each webhook delivery includes a signature, so the receiving system can confirm it came from Zenskar and was not altered in transit. Validate this signature before acting on a payload.

2. How-to guides

Create a webhook

  1. Click the account menu at the bottom of the sidebar, and select Settings.
  2. Open the Webhook Alerts tab.
  3. Click Add Webhook Alert.
  4. Enter a Webhook Name.
  5. Optionally click Add Description to add a description.
  6. Enter the Endpoint URL that should receive the payload.
  7. Enter a Secret Key. Use a long, random value.
  8. Leave Enable Webhook Alerts checked to activate the webhook immediately, or uncheck it to create it disabled.
  9. Select the events to subscribe to.
  10. Click Create.

Edit a webhook

  1. Open Settings > Webhook Alerts.
  2. Open the actions menu on the webhook’s row, and select Edit.
  3. Update any of the fields described in Create a webhook.
  4. Click Update.

Pause or resume a webhook

Open the actions menu on the webhook’s row, and select Pause or Resume.

Delete a webhook

  1. Open Settings > Webhook Alerts.
  2. Open the actions menu on the webhook’s row, and select Delete.
  3. Confirm the deletion.

View a webhook’s delivery history

  1. Open Settings > Webhook Alerts, and click a webhook’s row.
  2. The Alerts History panel lists past deliveries.
  3. Select a delivery to see its Triggered Webhook Details (webhook ID, status, and when it was last updated) and its Event Information (the JSON payload sent).

Resend a delivery

Open a delivery’s details, and use Resend to trigger it again.

Validate a webhook signature

Compute an HMAC using SHA256 with the secret key over the raw payload body, and compare it against the value in the X-Signature header, which is prefixed with sha256=.

Troubleshooting

  • Contract, invoice, or entitlement events are not selectable: these categories are not available in the webhook form for organizations on Contracts V3.
  • A delivery shows Failed: the endpoint did not return an HTTP 200 response. Confirm the endpoint is reachable and returns 200 on success.
  • The signature does not match: recompute the hash using the exact raw request body, not a re-serialized version of it. Re-serializing JSON can change the byte-for-byte content and produce a different hash.

3. Reference

Location

Settings > Webhook Alerts.

Fields

Event catalog

Event availability by contract experience

Delivery status

Signature validation