Skip to content

Email Setup

When a customer places an order, Shopify sends them an order confirmation email. You can add “Add to Apple Wallet” and “Save to Google Wallet” buttons to that email so customers can save their loyalty card immediately after purchase.

Customers receive their standard order confirmation email with two wallet buttons at the bottom. Tapping a button generates their loyalty pass on the fly and either downloads the .pkpass file (Apple) or opens the Google Wallet save page (Google). If the customer already has a pass, it updates their existing one instead of creating a duplicate.

The buttons use deterministic URLs — no login or authentication token is required. Each link includes a proof hash derived from the customer’s email address, so the URLs only work for the intended recipient.

In your SleekPass admin, go to Settings (the Pass Design page) and scroll to the Distribution section. Under Order Confirmation Email, click Show Liquid snippet. Click Copy snippet to copy it to your clipboard.

Step 2: Paste into Your Shopify Email Template

Section titled “Step 2: Paste into Your Shopify Email Template”
  1. In your Shopify admin, go to Settings > Notifications > Order confirmation (or use the direct link: https://admin.shopify.com/store/YOUR-STORE/email_templates/order_confirmation/edit, replacing YOUR-STORE with your store handle).

  2. Click Edit code to open the HTML editor.

  3. Paste the snippet before the closing </body> tag. This places the wallet buttons at the bottom of the email, after the order summary and shipping details.

  4. Click Save.

Tip: The SleekPass settings page includes a direct link to your store’s order confirmation template — look for the “order confirmation template” link beneath the snippet.

  1. Place a test order in your store (you can use a 100% discount code or Shopify’s Bogus Gateway to avoid real charges).
  2. Check the order confirmation email. You should see “Save your loyalty card:” with the two wallet buttons.
  3. Tap Add to Apple Wallet — it should download a .pkpass file that opens in Apple Wallet.
  4. Tap Add to Google Wallet — it should redirect to Google’s “Save to Wallet” page.

If you do not receive the email, check Settings > Notifications in Shopify admin to confirm the order confirmation notification is enabled.

The Liquid snippet generates a deterministic download URL for each customer. The URL includes a proof parameter — a SHA-256 hash of your shop domain, customer ID, and customer email. This prevents URL enumeration: someone who only knows a customer ID cannot generate a valid download link without also knowing the customer’s email address.

When a customer clicks the link:

  1. SleekPass looks up the shop and customer.
  2. It verifies the proof hash using the customer’s email from Shopify.
  3. If valid, it generates (or retrieves) the customer’s loyalty pass.
  4. For Apple: returns the .pkpass file as a download. For Google: redirects to the Google Wallet save URL.

Because Shopify’s Liquid template variables ({{ customer.email }} and {{ customer.id }}) are available in notification templates, the proof is computed entirely on Shopify’s side at email render time. No API call to SleekPass is needed to generate the email.

  • Confirm you saved the template after pasting the snippet.
  • Check that the snippet is inside the <body> tag, not after </body>.
  • Some email clients strip HTML tables aggressively. Send a test to a Gmail or Apple Mail account to verify.

Clicking the button returns “Missing proof” or “Invalid proof”

Section titled “Clicking the button returns “Missing proof” or “Invalid proof””
  • Make sure you copied the entire snippet, including the {% assign %} lines at the top. The proof computation must be present.
  • The proof is case-sensitive on the email. The snippet normalizes it with | strip | downcase. If you modified the snippet and removed those filters, the proof will not match.

Clicking the button returns “Shop not found”

Section titled “Clicking the button returns “Shop not found””
  • Your store must have SleekPass installed and active. If you uninstalled and reinstalled the app, the shop record may need to be re-created. Open SleekPass in your Shopify admin to trigger a session, then try the link again.

Clicking the button returns “Customer not found”

Section titled “Clicking the button returns “Customer not found””
  • The customer must exist in your Shopify store. If you deleted the customer or the order was placed by a guest who did not create an account, the link will not work.
  • Guest checkout customers are assigned a customer ID only if they opt in to marketing or create an account. Orders from purely anonymous guests will not have a {{ customer.id }} in the email template, so the buttons will render with a blank customer ID and fail.
  • The badge images are hosted at https://app.sleekpass.com/images/badges/. If your email client blocks remote images by default, the customer will need to click “Load images” or “Display images” in their email client.
  • The alt text (“Add to Apple Wallet” / “Add to Google Wallet”) will display as fallback text if images are blocked.
  • The snippet uses inline styles and HTML tables for maximum email client compatibility. If you modified the styles, revert to the original snippet from the SleekPass settings page.
  • Some email clients (particularly Outlook) may render table-based layouts slightly differently. The default snippet is tested against common email clients.