Handle Pdfmonkey Webhook

Handles the rendered-document webhook from either PDF provider (PDFMonkey or caresquare-pdf-generation) and records the result on the statement.

A single document can back several statement rows, one per recipient, so this updates every row sharing the document_id.

Uses the async Supabase client so a monthly statement run, which delivers one webhook per participant, does not block the worker's event loop.

post/api/v1/statements/pdfmonkey/webhook

Response

Successful Response

object[] required

Changes