LatchPay

Connections

Add the theme line

One script tag above </body> in theme.liquid. It does nothing until you switch the LatchPay checkout on.

Updated

The line

One script tag in your theme. It loads a small script from LatchPay that turns Checkout and Buy now into a link to the LatchPay checkout. It does nothing until you switch the checkout on, so you can paste it whenever you like. Copy it from the Theme snippet page in your dashboard; it looks like this. {{ shop.permanent_domain }} is a Liquid tag Shopify fills in, so paste it exactly as shown.

<script src="https://checkout.latchpay.io/latchpay.js" data-shop="{{ shop.permanent_domain }}" async></script>

Where to paste it

  1. Open your theme's code

    In your Shopify admin open Online Store → Themes. On your live theme choose … → Edit code.

    Online Store → Themes → ⋯ on the live theme → Edit code.
  2. Open layout/theme.liquid

    It is under Layout in the file list on the left.

  3. Paste the line directly above </body>

    Scroll to the end of the file and paste the line on its own line, just above </body>. Then Save.

    layout/theme.liquid with the LatchPay line on its own line, directly above </body>.
  4. Do the same on any other theme you publish later

    The line lives in the theme, so a new theme needs it again.

How LatchPay knows it is in

The line first asks LatchPay whether the checkout is enabled for your store (/api/snippet/config?shop=…). LatchPay records that call, so the wizard's theme-line step shows Seen on your store in the last 10 minutes as soon as any visitor, including you, opens a page of the store. The Theme snippet page in the dashboard shows the same liveness line and a link to test the config endpoint yourself; it answers "enabled": true only while the checkout is on.

What the line does

  • While the checkout is off, it only reports storefront events (page view, product view, add to cart) for Insights. Buyers keep using Shopify's checkout.
  • While the checkout is on, it hides the express buttons and turns the Checkout button, checkout links and Buy now into a hand-off to the LatchPay checkout. It prepares the checkout session while the buyer is still in the cart, so the click is a plain page change.
  • It never touches add-to-cart forms, never runs inside the theme editor, and if anything fails (a timeout, a network error) it falls back to Shopify's own checkout so a buyer is never stuck.
  • Browsers that send Global Privacy Control or Do Not Track get no storefront events; the checkout still works.

Honest limits

While LatchPay is on

Shop Pay, PayPal, Google Pay, Apple Pay and other express buttons are hidden. They would skip this checkout. They come back the moment you switch off.

Checkout apps that inject into Shopify's own checkout do not run on the LatchPay checkout.

Shopify may add third-party transaction fees when Shopify Payments is not used. That is Shopify's fee.

Money arrives through Whop. Buyers see WHOP* on their card statement.

Switching off in Settings restores Shopify's checkout on the next page load. The line can stay; it is harmless while LatchPay is off.

Still stuck?

Tell us what you see and which store it is about. We reply by email, usually within a day.

More in Connections