# Include links to invoices in the Order Confirmation email

> Add invoice links to Shopify order confirmation emails so customers can view, download, print, or pay invoices online.

Order confirmation emails are one of the first messages customers receive after placing an order, making them a useful place to include invoice links.

With Sufio, an invoicing app for Shopify stores, customers can access their invoice directly from the order confirmation email sent by Shopify.

## The online version of the invoice

When customers click the invoice link, they will be redirected to the online version of their invoice.

From there, they can download or print the invoice and view other documents related to the same order.

If you [accept card payments](<https://sufio.com/articles/shopify/accept-payments/credit-card/>), they can also pay any unpaid invoices online using their credit card.

To add a link to the online version of the invoice in the order confirmation email template:

1. In your Shopify admin, go to the **Settings** → **Notifications** → **Customer notifications** page.
2. In the **Customer processing** section, click **Order Confirmation**.
3. Click **Edit code** and insert the following code snippet into the **Email body (HTML)** field:

```html
<div class="invoice-link">
  <a href="{{ shop.url }}/apps/sufio/invoice/?id={{ id }}&number={{ order_number }}">View invoice</a>
</div>
```

4. Click **Save** to apply the changes.

> **See also**
>
> Want to create better-looking order confirmation emails? Sufio integrates with [Spently](<https://sufio.com/apps-integrations/uporder/>) and [Klaviyo](<https://sufio.com/apps-integrations/klaviyo/>), helping you turn transactional emails into polished customer touchpoints.

## PDF version of the invoice

You can also link directly to the PDF version of the invoice if you want customers to download it right away.

Use the following code snippet:

```html
<div class="invoice-link">
  <a href="{{ shop.url }}/apps/sufio/invoice/download/?id={{ id }}&number={{ order_number }}">Download invoice</a>
</div>
```

Please note that the PDF version does not allow customers to pay unpaid invoices online with their credit card.

## FAQ

### Can I attach the invoice to Shopify's order confirmation email?

Not as a file. Shopify's notification emails can't include attachments, so the invoice PDF can't be attached to the order confirmation email. Add a **Download invoice** link to the email instead, using the code snippet above. Customers click the link and get the PDF straight away.

### Can customers get the invoice as a PDF attachment at all?

Yes, in a separate email. Sufio can [send invoices to your customers automatically](<https://sufio.com/articles/shopify/send-invoices-customers/when-send-invoices/>), with the invoice attached as a PDF. This email is sent by Sufio, not as part of Shopify's order confirmation email.

### What does my customer see if the invoice hasn't been created yet?

Sufio creates the invoice when the customer opens the link, as long as the order meets your [conditions for creating invoices](<https://sufio.com/articles/shopify/create-documents-orders/create-invoices/>).

If the order doesn't meet them yet, for example because it hasn't been paid or fulfilled, the customer sees a page saying that the invoice is not yet available.

> **See also**
>
> Want to make invoices easier to access after checkout? Add invoice links to the [Customer account page](<https://sufio.com/articles/shopify/include-links-invoices/customer-account-page/>) or the [Thank you page](<https://sufio.com/articles/shopify/include-links-invoices/thank-you-page/>) so customers can find their invoices whenever they need them.
