Articles on: Invoices

How to add an invoice download button to Shopify order emails

Your customers already receive an order confirmation email from Shopify the moment they place an order. By adding a download invoice button to that email, you give customers instant, one-click access to their PDF invoice without needing to visit your store or contact support. This saves time for both you and your customers, reduces "where's my invoice?" support requests, and delivers a professional post-purchase experience that builds trust.


What This Feature Does


Invoice Falcon generates a small HTML code snippet that you paste into your Shopify order notification template. Here is how it works behind the scenes.


  • The code adds a clickable link (styled as a heading) to your order confirmation email with customizable text such as "Download Invoice."
  • When a customer clicks the link, Invoice Falcon automatically generates the PDF invoice for that order and delivers it as a direct download.
  • The link uses Shopify's built-in email variables ({{ id }} and {{ order_number }}) so it dynamically points to the correct invoice for each order.
  • If the invoice has not been generated yet, Invoice Falcon creates it on-the-fly when the customer clicks the link.


Tip: This feature works with any Shopify order-related email notification — not just the order confirmation. You can also add it to shipping confirmation, refund, and other order notification templates.


Steps to Add the Download Invoice Button to Your Order Confirmation Email


Follow these three steps to add the download invoice button to your Shopify order confirmation email. The entire setup takes just a few minutes.


Step 1 — Customize the button text


First, choose what text your customers will see in the email as the download link.


  1. Open the Invoice Falcon app from your Shopify Admin.
  2. Click Settings in the left-hand navigation menu.
  3. Click on Integrations tab
  4. In the text field labeled "1. Enter text for the download button", enter the text you want customers to see. The default text is "Download Invoice".
  5. You can change this to anything that makes sense for your store, such as:
  • "Download Your Invoice"
  • "Click Here to Download Invoice"
  • "View Invoice PDF"
  • "Télécharger la facture" (for French-speaking customers)


The code snippet below the text field updates automatically as you type, so the link text in the generated code always matches what you enter.


Step 2 — Copy the HTML code


Next, copy the generated HTML code that you will paste into your Shopify email template.


  1. Below the text field, you will see a code block labeled "2. Copy this code to your Order Confirmation email". This displays the generated HTML snippet in a read-only code editor.
  2. Hover your mouse over the code block to reveal a Copy button in the top-right corner of the code area.
  3. Click the Copy button. A toast notification confirms: "Code copied to clipboard!"


The generated code looks similar to this:


<!-- Invoice Falcon Email Code START -->
<table class='container' style='margin-bottom:25px'>
<tr>
<td>
<h4>
<a href='https://yourapp.com/pdfs/{{ id }}.pdf?shopify_domain=yourstore.myshopify.com&uuid={{ order_number }}'>
Download Invoice
</a>
</h4>
</td>
</tr>
</table>
<!-- Invoice Falcon Email Code END -->


Important: Do not edit the code manually. The {{id}} and {{order_number}} are Shopify Liquid variables that are automatically replaced with the actual order ID and order number when the email is sent to each customer. Changing these will break the link.


Step 3 — Paste the code into your Shopify order notification template


Now paste the copied code into the Shopify email notification template where you want the download link to appear.


  1. In your Shopify Admin, go to Settings → Notifications.
  2. Under Customer notifications, scroll down to the Orders section.
  3. Click on Order confirmation (or any other order-related notification where you want the download link).
  4. In the notification template editor, scroll to the Email body (HTML) section.
  5. Find a suitable location in the HTML where you want the download invoice link to appear. A common placement is near the top of the email body, just after the opening greeting, or at the bottom before the footer.
  6. Paste the code you copied from Invoice Falcon.
  7. Click Save to save the notification template.


Tip: Invoice Falcon provides a video guide showing exactly where to paste the code. In the Settings page, step 3 includes a link: "Send invoice in Order Confirmation email" — click it to watch the video tutorial on YouTube. There is also a reference screenshot displayed in the Settings page showing the recommended placement.


Test the Download Invoice Button


After pasting the code, it is important to test that the download link works correctly before relying on it for real orders.


  1. In your Shopify Admin, go to Settings → Notifications → Order confirmation.
  2. Click the Preview button at the top of the notification template to see how the email looks with the download link. Note that the preview will show the raw Liquid variables ({{ id }} and {{ order_number }}), not actual order data — this is normal.
  3. To do a full test, place a test order on your store (or use Shopify's Bogus Gateway for a test transaction).
  4. Check the order confirmation email you receive. You should see the download link with the text you configured.
  5. Click the link. It should open and download the PDF invoice for the order.


Note: The first time a customer clicks the download link for an order, Invoice Falcon generates the PDF on the fly. This may take a few seconds. Subsequent clicks for the same order will be faster since the PDF is already generated and stored.


Add the Button to Other Shopify Email Notifications


The download invoice code snippet works with any Shopify order-related email notification, not just the order confirmation. You can paste the same code into these templates.


  • Order confirmation — the primary email customers receive after placing an order
  • Order edited — sent when you edit the order
  • Shipping confirmation — sent when you fulfill the order
  • Shipping update — sent when tracking information is updated
  • Refund — sent when you issue a refund (customers can download the updated invoice showing the refund)


To add the code to another notification, follow the same steps as Step 3 above but select the desired notification template in Shopify Admin → Settings → Notifications.


Known Limitations


  • The code must be pasted manually into each Shopify notification template where you want the link to appear. There is no automatic injection — you must edit the email HTML yourself.
  • The download link uses Shopify's {{ id }} and {{ order_number }} Liquid variables, which are only available in order-related email templates. Pasting the code into non-order templates (e.g., account confirmation, password reset) will not work.
  • The link text is plain HTML (an <a> tag inside an <h4> heading). Advanced button styling (colored backgrounds, rounded corners) requires manual HTML/CSS editing in the Shopify notification template.
  • The PDF is generated on the first click if it does not already exist. This means there may be a brief delay (a few seconds) the first time a customer clicks the link for a new order.
  • Draft orders and quotes are not supported through this link. The download link only works for regular Shopify orders.
  • If you uninstall Invoice Falcon or your subscription lapses, the download links in previously sent emails will stop working since the PDF endpoint will no longer be available.
  • The code snippet is tied to your specific Shopify store domain. If you change your Shopify domain, you will need to regenerate and re-paste the code.


Troubleshooting


Symptom

Likely Cause

Fix

Customer clicks the link but sees a "Not Found" page

The order ID or order number in the link is incorrect, or the Shopify domain parameter is wrong

Regenerate the code from Invoice Falcon → Settings → Order confirmation email and re-paste it into the notification template. Do not manually edit the {{ id }} or {{ order_number }} variables.

The link text shows "Download Invoice" but you changed it

The old code is still in the Shopify notification template

After updating the text in Invoice Falcon Settings, copy the new code and replace the old code in your Shopify notification template.

The download link does not appear in the email

The code was not pasted correctly, or it was pasted outside the email body HTML

Open Shopify Admin → Settings → Notifications → Order confirmation, scroll to the Email body (HTML), and verify the Invoice Falcon code is present. Look for the <!-- Invoice Falcon Email Code START --> comment.

PDF takes a long time to load when the customer clicks

The invoice is being generated for the first time for that order

This is normal on the first click. The PDF is generated on-the-fly and cached for subsequent access. If it consistently takes too long, contact Invoice Falcon support.

The download link appears but is not clickable

The HTML code was pasted inside a text-only section or was escaped

Make sure you paste the code in the Email body (HTML) section, not in a plain text section. The code must be interpreted as HTML for the link to be clickable.


FAQs


Q: Do I need a paid plan to use the download invoice button in emails?
A: No, this feature is available on both plans - Free and Pro


Q: Can I customize the look of the download button (colors, background, size)?
A: The generated code creates a simple text link inside an <h4> heading. To change colors or add a button-style background, you would need to manually edit the HTML/CSS in the Shopify notification template after pasting the code.


Q: Does the code work with Shopify's new checkout and email editor?
A: Yes. The HTML code snippet can be pasted into any version of Shopify's notification template editor. It uses standard HTML that is compatible with both the classic and updated Shopify email template systems.


Q: Can I add the download link to multiple email notifications?
A: Yes. You can paste the same code snippet into any order-related Shopify notification template, including order confirmation, shipping confirmation, shipping update, order edited, and refund notifications.


Q: What happens if I change my download button text after already pasting the code?
A: Changing the text in Invoice Falcon Settings does not automatically update the code already in your Shopify notification template. You need to copy the updated code and replace the old code in each notification template where you pasted it.


Q: Will the download link work for orders placed before I set this up?
A: Yes. The link dynamically generates the invoice when clicked. Even for past orders, clicking the link will create and download the PDF invoice.


Q: Is there a video guide showing where exactly to paste the code?
A: Yes. In the Invoice Falcon Settings page, step 3 includes a link to a YouTube video tutorial titled "Send invoice in Order Confirmation email" that walks through the exact placement.


Q: What happens to the download links if I uninstall Invoice Falcon?
A: The links will stop working. They point to Invoice Falcon's server to generate and deliver the PDF. If the app is uninstalled, the server endpoint is no longer available and customers will see an error page.

Updated on: 20/05/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!