Download invoice PDF
On success, returns a 302 redirect to the PDF URL — no JSON envelope
on the 302 itself, this is the one endpoint that writes a raw HTTP
response instead of the standard envelope. Error responses are still the
standard JSON envelope.
Resolution precedence, in order: (1) a previously-stored S3 copy of the invoice PDF; (2) if a Stripe invoice PDF and invoice id are both on file, persist it to S3 now and use that URL, falling back to (3) the raw Stripe invoice PDF URL if that persist attempt fails; (4) the Stripe receipt URL; (5) the raw Stripe invoice PDF URL alone (no invoice id on file). The Stripe fallback URLs are temporary/time-limited by Stripe.

