{
  "id": 11204608,
  "title": "Stripe webhook to branded invoice PDF: a Cloudflare Worker recipe that keeps the file on your side",
  "url": "https://urgent.news/2026/10/01/stripe-webhook-to-branded-invoice-pdf-a-cloudflare-worker-recipe-that",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-01T13:57:16.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/michaelrice_dev/stripe-webhook-to-branded-invoice-pdf-a-cloudflare-worker-recipe-that-keeps-the-file-on-your-side-1o8c"
  },
  "original_language": "en",
  "account": "A Stripe payment triggers an invoice PDF via a Cloudflare Worker. The Worker verifies the webhook signature using Stripe's SDK, maps the Stripe invoice onto a template with JSON data, and stores the generated PDF on a Cloudflare R2 bucket. The template requires fields such as company name, invoice number, issue date, and customer name, along with optional branding details and optional status badge. The tax calculation is handled accurately to match Stripe's output, and any discrepancies result in an error. The handler checks for duplicate deliveries and uses waitUntil to ensure the response is processed before complex logic runs.",
  "summary": "A Stripe payment lands, and someone wants a PDF invoice that looks like your product: your logo, your brand color, your layout, saved where you keep records. Stripe already hosts its own invoice PDF ( invoice_pdf on the invoice). This recipe is for when you want your own template and your own copy. Status note: Slipmint is a side project in development. Free API keys go out by invite to waitlist…",
  "key_points": [
    "Stripe webhook triggers invoice PDF generation",
    "Cloudflare Worker verifies signature and maps data",
    "Generated PDF stored on Cloudflare R2 bucket"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}