P
PayDock Docs

Webhooks

Receive real-time notifications when data changes.

Setting up a webhook

  1. Go to Settings > Webhooks.
  2. Enter your endpoint URL.
  3. Select the events you want to listen to.
  4. Click 'Add webhook'.

Available events

  • contact.createdNew contact created.
  • contact.updatedContact updated.
  • contact.deletedContact deleted.
  • product.createdNew product created.
  • product.updatedProduct updated.
  • product.deletedProduct deleted.

Payload format

POST https://your-endpoint.com/webhook

{
  "event": "contact.created",
  "data": { /* full contact object */ },
  "timestamp": "2026-04-10T14:32:00Z"
}

Signature verification

Every webhook contains an HMAC-SHA256 signature in the X-Webhook-Signature header. Verify it with your webhook secret to guarantee authenticity.

// Verify signature
const crypto = require("crypto");
const expected = crypto
  .createHmac("sha256", webhookSecret)
  .update(rawBody)
  .digest("hex");

if (signature !== expected) {
  throw new Error("Invalid signature");
}