Webhooks

Use webhooks for both billing synchronization and async conversion callbacks.

Paddle billing webhook endpoint

POST https://api.html2pdf.online/v1/billing/webhook

Required Paddle events

  • subscription.created
  • subscription.updated
  • subscription.canceled

Secret configuration

Set webhook signing secret in backend env:

PADDLE_WEBHOOK_SECRET=pdl_ntfset_xxx

Async convert callback webhook

Add `webhook` in `POST /v1/convert/async` payload. API immediately returns queued response and your endpoint receives final result.

{
  "source": "https://example.com",
  "webhook": "https://your-app.com/pdf-callback",
  "filename": "invoice.pdf"
}

Convert callback payloads

Success payload:

{
  "success": true,
  "filename": "invoice.pdf",
  "filesize": 294048,
  "executed": "2026-04-22T10:52:47.123Z",
  "result": "<base64-pdf>"
}

Error payload:

{
  "error": {
    "code": 500,
    "message": "render_failed",
    "identifier": "render_failed"
  }
}