New webhook event: invoice.pdf.generated
invoice.pdf.generated tells you an invoice's PDF is stored and ready, so you can fetch it instead of polling.
If you keep a copy of each invoice PDF, you had no way of knowing when it was ready. Subscribe to invoice.pdf.generated and you are told when an invoice's PDF is stored, so you can fetch it.
It is the push counterpart to the PDF download that waits: one saves you polling while you wait, the other saves you polling at all.
What else changed
- For an issued invoice it fires once. Its PDF is generated a single time and is not modified afterwards: voiding or correcting the invoice sends no new event. A proforma sends it each time its PDF is generated.
data.generationnumbers the stored PDF. - The payload carries no URL. A signed download link expires in minutes, sooner than the delivery could be retried. Fetch the PDF from the download endpoint when the event arrives.
- On a managed account it also reaches the managing party, like
invoice.issued: the PDF is the fiscal document, and whoever issues on the holder's behalf is who archives it.
Endpoints
- GET/v1/companies/{company_id}/invoices/{invoice_id}/pdfWhere to fetch the PDF the event announces
Where to go next
A payment connection says which Stripe events it invoices
`event_source` (`PAYMENTS`, `INVOICES` or `BOTH`) picks which family of Stripe events a connection invoices. Existing connections are `BOTH`, which is today's behaviour.
Clearer rejections, and updates that do not re-ask the census
A customer update only asks the AEAT census when the fiscal pair changes, the invitation `404` stops saying "pending", and readiness names an incomplete identity.