App Logo
invoice.stripe.com

Download Stripe invoice/receipt PDF

Download a Stripe-hosted invoice or payment receipt PDF from its hosted_invoice_url. Returns the PDF bytes as base64 (decode + write it yourself) plus the real filename. Vendor-agnostic and login-free: the hosted_invoice_url is a public tokenized link, so it works for any Stripe-billed service (Claude, ChatGPT, Notion, Slack, Lovable, ...). An expired or dead URL fails cleanly.

Input

hosted_invoice_url required

A Stripe-related invoice URL from a vendor's list_invoices script -- any of: a Stripe hosted invoice page (invoice.stripe.com/i/...), an HTML receipt page with Download invoice/receipt links (e.g. pay.stripe.com/receipts/invoices/...), or a direct file URL that downloads immediately (pay.stripe.com/invoice/.../pdf, a presigned S3/Orb link). The script detects which shape it is from the page itself.

doc_type optional

Which PDF to download: 'invoice' (the formal invoice, default) or 'receipt' (the payment receipt, only present once paid). For a direct-file-URL page there is only ever one document available -- requesting the one that isn't there fails loud rather than silently returning the wrong one mislabeled.

Default: "invoice"

Output

doc_type required

Which document was downloaded: invoice or receipt.

filename required

The real suggested filename (e.g. Invoice-V1L1VMU8-0001.pdf or Receipt-2415-5423.pdf), taken from the file's Content-Disposition.

pdf_base64 required

The PDF file bytes, base64-encoded. Decode and write to a .pdf file at a location of your choosing (the script is sandboxed and cannot write to disk itself).

Start building not clicking