Add a receipt link to your notification emails

SAKU Receipts: Adding a receipt link to notification emails

  • Invoice-ready

  • Hydrogen-ready

  • From $4.99/mo

SAKU Receipts: Adding a receipt link to notification emails

App features

  • Customers issue documents themselves from the Thank you page, order status page and emails
  • Invoice registration number (Japan) and tax breakdowns by rate (8% / 10%)
  • Set your company logo, stamp and theme color
  • Print from the admin one order at a time or in bulk
  • Documents in Japanese and English
  • Pro plan: remarks by payment method or tag, issued tags and issue limits
  • Hydrogen plan: issue documents on headless (Hydrogen) stores too

*Note
Supports new customer accounts.
Partially supports classic customer accounts (supported themes: Dawn, Rise and Studio).

When an order is placed, Shopify sends the customer an "Order confirmation" email. This article explains how to add buttons to that email that open receipts and other documents. All you need to do is copy and paste the code below.

What you need before you start

  • SAKU Receipts is installed
  • You can edit the code of the customer notification (the order confirmation email) in the Shopify admin
  • For Hydrogen (headless) stores: you are on the Hydrogen plan (see "For Hydrogen (headless) stores" below)

In this article

  • The code to paste into the order confirmation email
  • Where to paste the code
  • How to show buttons only for the documents you need
  • How to check it, and what happens for unpaid orders
  • How to switch between English and Japanese documents
  • How to add a delivery note button to the shipping email (Shipping confirmation)

Where to find it: Shopify admin → Settings → Notifications → Customer notifications → Order confirmation

Clicking "Email setup guide" in step 3 of the "Setup Guide" on the app's "Home" page opens this article. Clicking "Open order confirmation email" in the same step opens Shopify's "Notifications" list. On stores with the Hydrogen plan, the same step also shows a "Hydrogen setup guide" button (because Hydrogen stores use a different link in the email; see "For Hydrogen (headless) stores" below).

Step 3 of the Setup Guide


First, choose the code to use

There are two versions of the code. Choose based on what you want to show.

  • All four buttons (receipt, delivery note, invoice and quote): use "Code A".
  • Only the receipt button: use "Code B".
  • Any other combination: paste "Code A", then delete the three lines from <td class="saku-action-cell_button"> to </td> for each document you don't need.

Code A (four buttons)

This code shows four buttons: receipt, delivery note, invoice and quote. The documents open in English (locale=en).

<style>
  .saku-button__text {
    display: block;
    color: #000;
    background: #f0f0f0;
    padding: 20px 10px;
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    line-height: 1;
  }
  .saku-action-cell {
    margin-top: 20px;
    width: 100%;
  }
  .saku-action-cell_button {
    padding: 4px;
  }
</style>
<table class="saku-action-cell">
  <tr>
    <td class="saku-action-cell_button">
      <a href="{{ shop.url }}/apps/saku-print?orderId={{ id }}&confirmationNo={{ confirmation_number }}&type=receipt&locale=en" class="saku-button__text">Receipt</a>
    </td>
    <td class="saku-action-cell_button">
      <a href="{{ shop.url }}/apps/saku-print?orderId={{ id }}&confirmationNo={{ confirmation_number }}&type=delivery_note&locale=en" class="saku-button__text">Delivery Note</a>
    </td>
    <td class="saku-action-cell_button">
      <a href="{{ shop.url }}/apps/saku-print?orderId={{ id }}&confirmationNo={{ confirmation_number }}&type=invoice&locale=en" class="saku-button__text">Invoice</a>
    </td>
    <td class="saku-action-cell_button">
      <a href="{{ shop.url }}/apps/saku-print?orderId={{ id }}&confirmationNo={{ confirmation_number }}&type=quotation&locale=en" class="saku-button__text">Quotation</a>
    </td>
  </tr>
</table>

Code B (receipt button only)

This code shows only the "Receipt" button.

<style>
  .saku-button__text {
    display: block;
    color: #000;
    background: #f0f0f0;
    padding: 20px 10px;
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    line-height: 1;
  }
  .saku-action-cell {
    margin-top: 20px;
    width: 100%;
  }
  .saku-action-cell_button {
    padding: 4px;
  }
</style>
<table class="saku-action-cell">
  <tr>
    <td class="saku-action-cell_button">
      <a href="{{ shop.url }}/apps/saku-print?orderId={{ id }}&confirmationNo={{ confirmation_number }}&type=receipt&locale=en" class="saku-button__text">Receipt</a>
    </td>
  </tr>
</table>

For Hydrogen (headless) stores

On Hydrogen stores, the {{ shop.url }}/apps/saku-print?… links in the code don't open. Replace the links as follows (these steps are only for stores on the Hydrogen plan).

  1. Open the app's "Settings" page. On the "Hydrogen" tab, in "Hydrogen store (Hydrogen plan)", under "Order confirmation email link", click "Copy link".
  2. In Code A (or Code B) above, replace the link inside href="…" of each button with the link you copied.
  3. The copied link is for receipts. In the link, change only the receipt part of type=receipt (the word after the =) to the word in the table below. Leave everything else as it is.
Document you want to openWord to enterResult
Receiptreceipttype=receipt
Delivery notedelivery_notetype=delivery_note
Invoiceinvoicetype=invoice
Quotequotationtype=quotation

Here is an example of a link after the change (for an invoice). It shows the shape of the link; only the invoice part changes.

{{ shop.url }}/apps/saku-print?orderId={{ id }}&confirmationNo={{ confirmation_number }}&type=invoice&locale=en

For details, see "Setup guide for Hydrogen (headless) stores".


1️⃣ Open the order confirmation email editor

In the Shopify admin, open "Settings" → "Notifications" → "Customer notifications".

Shopify's notification settings

Click "Order confirmation" in the list.

The customer notifications list with \

Click "Order confirmation" in the red box.

When the preview opens, click "Edit code" at the top right.

Preview of the order confirmation email (before adding the buttons)


2️⃣ Paste the code

  1. Copy Code A (or Code B) above. Select everything in the code box and press cmd + C (Ctrl + C on Windows).
  2. Click inside the code in the editor and press cmd + F (Ctrl + F on Windows) to search for "Visit our store" (「ショップにアクセスする」 if your store's notifications are in Japanese). You'll find about four matches. Press Enter to move to the next one until you reach the last one.
  3. A little below that line, you'll see two consecutive lines that say {% endif %}. Click the line right after the second {% endif %} to place your cursor there.
  4. Press cmd + V (Ctrl + V) to paste.
  5. Click "Save" at the top of the page.

Here's where to paste it (in reality there is other code before and after).

{% endif %}
{% endif %}
← Paste the copied code here

The Edit code screen for Order confirmation, with the email body (HTML) code field marked by a red box

Paste the code into the email body (HTML) code field in the red box.


3️⃣ Check how it looks

Click "Preview" at the top right and check that the document buttons appear below "Visit our store".

Preview of the order confirmation email with the document buttons added

Check what happens when the buttons are clicked using a real order confirmation email. Place a test order, click a button in the "Order confirmation" email you receive, and check that the document page opens.

Note: emails from "Preview" and "Send test email" are created with a sample order. The sample order doesn't actually exist, so clicking a button may not open the document and may show "Order not found." instead.


What the email looks like

The "Order confirmation" email your customers receive shows the receipt and other buttons below "Visit our store". Clicking a button opens the document for that order, even without logging in (it's shown only when the order ID and confirmation number match).

  • For orders that haven't been paid yet, such as bank transfer or cash on delivery, clicking "Receipt" shows "Payment has not been completed for this order." "Delivery Note", "Invoice" and "Quotation" can be shown.
  • To show Japanese documents instead, change only the en part of locale=en in the code (the word after the =) to ja (lang=ja works the same way), in every button, and change the button text to Japanese if needed. locale= in older code still works.

Here is an example of a link after the change (the receipt button):

{{ shop.url }}/apps/saku-print?orderId={{ id }}&confirmationNo={{ confirmation_number }}&type=receipt&locale=ja

The link for Hydrogen stores doesn't include a language, so add &lang=en to the end of the link for English documents.

For how unpaid orders are handled, see "Issuing receipts for cash on delivery and bank transfer orders".

Customers can download documents from three places: the "order status page", the "Thank you page" and the "order confirmation email". It's convenient to set them up together: Order status page / Thank you page / Order confirmation email

4️⃣ Add a delivery note button to the shipping email (Shipping confirmation)

You can add a delivery note button to the email customers receive when you mark an order as fulfilled (called "Shipping confirmation" in Shopify). Customers can then open the delivery note for that order from the shipping email.

On the Pro plan, if you set "Delivery notes customers open" to "Split by shipment", customers can open a separate delivery note for each shipment (only the items and quantities sent in that shipment), even when an order ships in two or more parts. For the settings, see "How to issue a delivery note for each shipment (list shipped items only)".

① Open "Shipping confirmation".
In the Shopify admin, go to "Settings" → "Notifications" → "Customer notifications", and click "Shipping confirmation" under "Order processing" (sent when you mark an order as fulfilled). When the preview opens, click "Edit code" at the top right.

② Copy Code C below.
This code shows only the delivery note button. Select everything in the code box and copy it with cmd + C (Ctrl + C on Windows).

Code C (delivery note button only)

<style>
  .saku-button__text {
    display: block;
    color: #000;
    background: #f0f0f0;
    padding: 20px 10px;
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    line-height: 1;
  }
  .saku-action-cell {
    margin-top: 20px;
    width: 100%;
  }
  .saku-action-cell_button {
    padding: 4px;
  }
</style>
<table class="saku-action-cell">
  <tr>
    <td class="saku-action-cell_button">
      <a href="{{ shop.url }}/apps/saku-print?orderId={{ id }}&confirmationNo={{ confirmation_number }}&type=delivery_note&locale=en" class="saku-button__text">Delivery Note</a>
    </td>
  </tr>
</table>

③ Find where to paste it.
Click inside the code in the editor and search for tracking_numbers.size > 0 with cmd + F (Ctrl + F on Windows). Click at the start of the line that is found ({% if fulfillment.tracking_numbers.size > 0 %}) to place the cursor there.

This shows where to paste it (in the real template, there is other code before and after).

{% endif %}
← paste the copied code here
{% if fulfillment.tracking_numbers.size > 0 %}

④ Paste with cmd + V (Ctrl + V) and click "Save" at the top of the page.

⑤ Check it with "Preview" at the top right.
You're done when the "Delivery Note" button appears below "Visit our store".

  • Check how the button works with an email you receive after actually marking an order as fulfilled. The preview and test emails use a sample order, so the document won't open.
  • Delivery notes can be opened even for orders that haven't been paid yet (for example, pay-later orders).
  • For a Japanese delivery note, change only the en part of locale=en in the code to ja.
  • On a Hydrogen store, replace the link in the code with the link you copied from the Settings page as described in "For Hydrogen (headless) stores" above, and set type= at the end to delivery_note.


Troubleshooting

  • The buttons don't appear
    The code may be in the wrong place. Search for "Visit our store", move to the last match, and paste the code on the line right after the second of the two consecutive {% endif %} lines a little below it. Also check that you clicked "Save" after pasting.
  • I can't find "Visit our store"
    If you've changed the wording of the email, the text may be different. Try searching for a shorter phrase such as "Visit our". If you still can't find it, contact us at info@saku-apps.com.
  • Clicking a button shows "Order not found."
    Emails from "Send test email" are created with a sample order, so documents can't be opened. Check with the "Order confirmation" email for a real test order.
  • Clicking a button shows "Login is required. Please log in again."
    The confirmationNo={{ confirmation_number }} part of the code may be missing or changed. Copy the code in this article and paste it again.
  • On a Hydrogen store, documents don't open when the button is clicked
    Check that the link isn't still {{ shop.url }}/apps/saku-print. Replace it with the link copied from the Settings page, following "For Hydrogen (headless) stores" above.
  • Can I keep locale=ja or locale=en from older code?
    Yes, it works as is. You can set the language with either locale= or lang=.
  • The delivery note button doesn't appear in the shipping email
    Check that you pasted the code into "Shipping confirmation" (not "Order confirmation"), just before the tracking_numbers.size > 0 line, and that you clicked "Save".
  • I want to send emails with another email app
    See "Sending the order confirmation email with another email app".

Updated February 18, 2026: Previously, the notification email linked to the order details page. With a later update, the buttons in the notification email now open documents directly.