Add an Invoice Link to Shopify Emails

Add a Download your invoice link to a Shopify customer notification.

What this setup does

This guide adds a Download your invoice link to a Shopify customer notification. Shopify creates the correct customer order URL for each email, and the customer opens that order to download the invoice provided by Order Editing.

The setup has two parts: copy the supported link from Order Editing, then add and test it in Shopify.

Before you begin

  • Set up Downloadable Invoices.

  • Confirm that an existing recent order has an invoice available on its Order Status Page.

  • Make a copy of the Shopify notification code before editing it.

In Order Editing: copy the invoice link

  1. Open App Settings > Editing blocks > Downloadable Invoices.

  2. Expand Integrations.

  3. Find Send invoices using Shopify Email and select View.

  4. Copy the code snippet from the dialog.

The supported link uses Shopify's {{ customer_order_url }} variable. It should look similar to this:

<a href="{{ customer_order_url }}" style="text-decoration: none; color: #000; font-weight: bold;">Download your invoice</a>
warning icon

Keep href="{{ customer_order_url }}" unchanged. Do not build a link from a store username, order ID, customer ID, or an Order Editing API address.

In Shopify: add the link to a notification

  1. In Shopify admin, open Settings > Notifications > Customer notifications.

  2. Choose the notification you want to update, such as Order confirmation.

  3. Select Edit code.

  4. Paste the copied snippet in the email body where you want the invoice link to appear.

  5. Select Preview and check the placement.

  6. Select Send test email.

  7. Open the test email and select Download your invoice.

  8. Confirm the link opens the correct order and that its invoice is available.

  9. Return to the notification editor and select Save.

Repeat the test for every notification you update. The variable is supported only in notification templates where Shopify supplies customer_order_url.

Change the appearance

You can change the link text and its CSS styling. Keep the href value unchanged so Shopify continues to generate the correct authenticated order link.

If you are not comfortable editing HTML email code, ask a developer to adjust the surrounding markup.

Troubleshooting

The link does not appear

Confirm that you pasted the snippet into the email body, not the subject, and saved the same notification you tested. Check the preview again before sending another test.

The link opens an order without an invoice

First open the order used by the email preview and confirm Downloadable Invoices is enabled and an invoice is available. Then verify that the test email was generated for that order.

The link opens the wrong page or does not work

Replace any hand-built URL with the snippet shown in Order Editing. If {{ customer_order_url }} is intact and the problem continues, contact Order Editing support from the app and include the notification name, a screenshot of the code, and the test result.

Did this answer your question?
😞
😐
😁