## TL;DR

invoice_pdf is null for draft invoices because Stripe only renders the PDF at finalization, so the common fix is to finalize first and re-fetch. If a finalized invoice still lacks a PDF, check for rendering failures on custom templates or missing business details, then regenerate from the dashboard. Never cache a null as permanent.

## Error

```text
```text
"invoice_pdf": null
```
```

## Steps

1. Check the invoice status: drafts always report invoice_pdf null.
   Expected: You confirm draft vs finalized in one read.
2. If draft, finalize the invoice, then re-retrieve it and read invoice_pdf again.
   Expected: The PDF URL appears after finalization.
3. If finalized and still null, open the invoice in the dashboard and try the manual download.
   Expected: You learn whether the failure is API-only or a rendering failure.
4. Inspect custom invoice template settings: broken logo URLs or invalid custom fields can fail rendering.
   Expected: You find the template-level cause.
5. Fix the template, then use the dashboard regenerate option or create a new invoice revision.
   Expected: A fresh PDF renders and the URL populates.

## When to use

- invoice_pdf is null on the API response
- You need the PDF link before the invoice finalizes (it does not exist yet)
- Custom templates may be breaking PDF rendering

## When not to use

- You want the hosted payment page URL (that is hosted_invoice_url)
- The PDF exists but your download code mishandles the URL
- You need invoice data as JSON, not a PDF

## Compatibility

All Stripe API versions; invoice_pdf on invoice objects. Dashboard PDF regeneration available on all plans.

## Variant phrasings

### ### invoice_pdf null draft invoice

### ### Stripe invoice PDF missing after finalize

### ### regenerate invoice PDF Stripe

## Root cause

The PDF is a rendered artifact of the finalized invoice: number, dates, and totals only become immutable at finalize, so Stripe defers rendering until then. A null on a finalized invoice means the render job itself failed, almost always on custom template content.

## Edge cases

- Very large invoices with thousands of lines can time out rendering; paginate line items in your template
- Logo URLs must be publicly reachable at render time
- Test-mode invoices render PDFs the same way, so reproduce there first

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst__ASBL75EVlOM4MkPPXw9vA
