Skip to main content

Add invoice download link (URL) to the Shopify admin emails

Copy and paste the snippet, takes only a few minutes

Updated today

You can now add a SuperFaktúra document download link (URL) directly to your Shopify admin emails, aka. Notifications (e.g., when an order is created or paid).

Step 1: Copy this snippet

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

<!-- SuperFaktúra document URL 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 document <a href="https://make-it-easy-superfaktura.gadget.app/order-document-link?orderId={{ order.id }}&shopId={{ shop.id }}&hmacVerification={{ hmac }}">here</a>.
</p>
<!-- SuperFaktúra document URL Code END -->

Step 2: Open Shopify Settings » Notifications » Customer Notifications

Step 3: Choose the notification (email) where you want to add the URL » Click Edit code

For example, you can add the URL to the Order Confirmation email, but you can choose any other notification as well.

Step 4: 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

You can edit the "You can download your document here" text in the code snippet to translate or customize it as needed.

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.

Step 5: Done! Your notification is ready!

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

Did this answer your question?