Webhooks

FinePDF can notify your application in real-time when an asynchronous generation job is completed or fails.

Setup

1. Register your endpoint URL in the Webhooks section of your dashboard.
2. Assign a secret key to your webhook for signature verification.

Generating Asynchronously

To trigger a webhook, set the async=true query parameter when calling the generation endpoint:

POST /v1/generate?async=true

Signature Verification

Every webhook request includes an X-FINE-Signature header. This is anHMAC-SHA256 hash of the raw request body using your webhook secret.

Verification Example (Node.js)

const crypto = require('crypto');

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

Retry Policy

If your server returns a non-2xx status code, FinePDF will retry the delivery up to 3 times with exponential backoff.