Premier Letters

Settings

Webhooks

Configure webhook endpoints to receive real-time notifications when order status changes. Perfect for CRM integrations and automation.

Your Webhook Endpoints

Loading...

Verifying Webhook Signatures

Each webhook request includes a signature in the X-Premier-Letters-Signature header. Verify it using HMAC-SHA256:

const crypto = require('crypto');

function verifySignature(payload, signature, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex');
  return signature === expected;
}

Webhook Headers:

  • X-Premier-Letters-Signature — HMAC-SHA256 signature
  • X-Premier-Letters-Event — Event type (e.g., order.shipped)
  • X-Premier-Letters-Delivery-Id — Unique delivery ID