Skip to main content
All CollectionsShopify + SuperFaktúra
How to add an invoice download link (URL) to the order confirmation email?
How to add an invoice download link (URL) to the order confirmation email?

Copy and paste the snippet, takes only a few minutes

Ben Badinszky avatar
Written by Ben Badinszky
Updated yesterday

Now you can insert a link to the created invoice directly into the orer confirmation email template, which is automatically sent from your store as a Shopify Admin email. (for example, upon receiving a new order, or upon its payment).

Step 1: Copy this snippet

To use this feature, simply copy the code snippet provided below:

<!-- Invoice SuperFaktúra Code START -->
{% assign secret_key = shop.metafields.app--92686090241--hmac.secret_key %}
{% assign data_to_sign = order.id | append: shop.id %}
{% assign hmac = data_to_sign | hmac_sha256: secret_key %}
<p>
You can download your invoice <a href="https://make-it-easy-superfaktura.gadget.app/order-document-link?orderId={{ order.id }}&shopId={{ shop.id }}&hmacVerification={{ hmac }}">here</a>.
</p>
<!-- Invoice SuperFaktúra Code END -->

Step 2: Open Shopify Settings

And then go to » Notifications » Customer notifications

Select the Order confirmation email (of course, you can choose any other as needed):

Step 3: Paste the snippet and Save

Paste the code provided above into the body of the email where you need it. You can Preview your email to check the place of the download link in the email.

When you pasted the snippet to to the correct place, click Save

There might be cases where, after successful implementation, clicking the link results in a 401 error: Unauthorized. This is due to email caching on Shopify's side. Please try again in 3 hours; it should work then.

Done! Your order confirmation email is ready!

From now, a the customers can download the created document directly from the Shopify Admin emails.

Did this answer your question?