FacturX
← All articles

Add an invoice link to Shopify's order confirmation email

Published on · FacturX

Shopify confirmation email with invoice link

The order confirmation email is the most-opened message in all of e-commerce — often above a 70% open rate. It is therefore the ideal place to slip in the invoice download link. Here is how to add it on Shopify in five minutes.

The principle

Shopify lets you customize its notification templates (Settings → Notifications) with Liquid code. FacturX provides a ready-to-paste snippet that generates, for each order, a unique and secure link to its PDF invoice.

The link points to a clean download page: the customer clicks, the invoice appears, they download it. No account to create, no app to install on the customer’s side.

Step by step

  1. Open FacturX and go to Configuration → Integration: the snippet is displayed with a copy button.
  2. In the Shopify admin, open Settings → Notifications → Customer notifications → Order confirmation, then Edit code.
  3. Find the spot where you want the link to appear — usually right after the order summary.
  4. Paste the snippet, save, and send yourself a test email from the same screen.

The snippet looks like this (yours contains your own store URL):

{% raw %}<a href="https://app.facturx.net/invoices/{{ id }}/{{ attributes.facturx_token }}/download">
  Download your invoice (PDF)
</a>{% endraw %}

Pitfalls to avoid

  • Never build the link by hand from the order number: anyone could guess other customers’ URLs. The FacturX snippet uses a unique, unguessable token per order.
  • Test with a real order (or a test order), not just the preview: some Liquid variables only resolve on actual sending.
  • Think about the other notifications: the same snippet works in the “Order receipt” or “Shipping confirmation” email if you rather generate your invoices on fulfillment.

What if the invoice doesn’t exist yet when the email goes out?

Good question: the confirmation email leaves immediately, sometimes before the invoice is generated. FacturX handles this case: the link triggers on-the-fly generation if the invoice does not exist yet, then serves the PDF. If the invoice has already been issued, the PDF frozen at issuance is served identically — in line with the immutability obligation.

Combine the email with on-store buttons

The email link covers the “let me search my inbox” reflex. For full coverage, also add the download button on the thank-you page and in the customer account: every customer then finds their invoice in the first place they look, and nobody writes to ask for it anymore.

Not equipped yet? Install FacturX for free — the email snippet, the buttons and compliant Factur-X invoices are all included.

Compliant invoices, on autopilot

FacturX automatically generates Factur-X invoices for your Shopify orders, with legal numbering and accounting exports. Free during early access.

Install FacturX