App Logo
admin.shopify.com

Download a Shopify invoice PDF

Automatically download a Shopify invoice PDF on admin.shopify.com. Download one Shopify store invoice PDF, given the invoiceUrl (or number) that admin.shopify.com/list_invoices returns. Exports the invoice as PDF from its billing page and saves the file under Shopify's own filename, returning where the browser saved it (or a link to it on a managed browser). Fails with a clear message when the invoice has no export or Shopify issues no PDF for it.

Input

store optional

The store handle (e.g. 0qknc0-kx), as returned in list_invoices' store field. Optional: discovered from the signed-in admin when omitted, and ignored when invoiceUrl is given.

number optional

The invoice number from admin.shopify.com/list_invoices. Required unless invoiceUrl is given.

invoiceUrl optional

The row's invoiceUrl exactly as returned by admin.shopify.com/list_invoices. Preferred — both store and number are read from it.

Output

via required

How the file was obtained: the signed document link Shopify issues from the invoice page's PDF export, downloaded by the browser.

number required
filename required

Shopify's own filename for the invoice PDF (e.g. invoice_596948484_2.pdf).

url optional

On a managed browser, a link to the PDF bytes (the file is not on the browser's machine); null otherwise.

path optional

Where the PDF was saved on the machine running the browser; null on a managed browser.

FAQ

Download one Shopify store invoice PDF, given the invoiceUrl (or number) that admin.shopify.com/list_invoices returns. Exports the invoice as PDF from its billing page and saves the file under Shopify's own filename, returning where the browser saved it (or a link to it on a managed browser). Fails with a clear message when the invoice has no export or Shopify issues no PDF for it.
Ask an AI agent connected to Reduck to run reduck/admin.shopify.com/download_invoice, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/admin.shopify.com/download_invoice
You do not need one. "Download a Shopify invoice PDF" drives the real admin.shopify.com pages in a browser, so it works whether or not admin.shopify.com offers an API for this.
Optional: store, number, invoiceUrl.
It returns url, via, path, number, filename.
Yes. It acts as you on admin.shopify.com: on your own Chrome it reuses your session, and on a Reduck-hosted browser it loads the admin.shopify.com cookies saved by the Reduck extension.
It only reads. It looks things up on admin.shopify.com and changes nothing there.
Ask an AI agent connected to Reduck to run reduck/admin.shopify.com/download_invoice, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/admin.shopify.com/download_invoice
It is part of Reduck's official curated catalogue.

Start building not clicking