All posts

Shopify Terms and Conditions Checkbox: How to Require It (and Close the Loopholes)

How to add a required "I agree to the terms" checkbox to your Shopify cart and drawer, why Shop Pay, Apple Pay and Buy it now skip it, and what consent evidence actually helps in chargeback disputes.

Shopify doesn't come with an "I agree to the terms and conditions" checkbox. Merchants have been asking for one in the Shopify Community since at least 2019, for several reasons:

  • Local law (for example, German AGB rules or Turkey's distance sales agreement)
  • Product safety notices
  • Stronger evidence when a customer disputes a charge

This guide covers where the checkbox can go, how to add it yourself, the gaps people usually miss, and what consent evidence is actually worth keeping.

Short answer

  • Inside checkout: only on Shopify Plus, using a checkout UI extension. On other plans you can't add a checkbox to the information, shipping or payment steps.
  • On every plan: put the checkbox in the cart page and cart drawer, right above the checkout button, and keep checkout disabled until it's ticked.
  • The catch: express checkout buttons (Shop Pay, Apple Pay, Google Pay, PayPal), "Buy it now" buttons and direct checkout links skip the cart. A checkbox that only lives in the theme doesn't stop them.

Option 1: Add the checkbox yourself with theme code (free)

This works on Online Store 2.0 themes like Dawn. Back up your theme first.

1. Add the checkbox above the checkout button. In Dawn, find <div class="cart__ctas" in both sections/main-cart-footer.liquid (cart page) and snippets/cart-drawer.liquid (drawer). Paste this above it:

html
<div class="cart-terms">
  <input type="checkbox" id="agree-terms" name="attributes[Terms accepted]" value="yes">
  <label for="agree-terms">I have read and agree to the <a href="/policies/terms-of-service" target="_blank">Terms of Service</a></label>
</div>

Use a different id in the drawer, for example agree-terms-drawer. If the cart page and drawer use the same id, ticking one box leaves the other unticked, which is the most common bug in the Community thread.

2. Disable checkout until the box is ticked. In Dawn the checkout button id is checkout on the cart page and CartDrawer-Checkout in the drawer:

html
<script>
  document.addEventListener('DOMContentLoaded', function () {
    [['agree-terms', 'checkout'], ['agree-terms-drawer', 'CartDrawer-Checkout']].forEach(function (pair) {
      var box = document.getElementById(pair[0]);
      var btn = document.getElementById(pair[1]);
      if (!box || !btn) return;
      btn.disabled = !box.checked;
      box.addEventListener('change', function () { btn.disabled = !box.checked; });
    });
  });
</script>

3. Save the answer on the order. The attributes[...] name sends the value to the cart, so it shows up under the order's Additional details. Note that the drawer often re-renders with JavaScript, so test that the attribute is still on the order after you open and close the drawer.

Limits of the DIY version

  • Theme updates can overwrite your edits, and every theme uses different file names and button ids.
  • When the drawer re-renders, your listener can be lost and the button re-enabled.
  • It records "yes" but not which version of your terms the customer accepted.
  • It does nothing about the loopholes below.

The loopholes: Shop Pay, Apple Pay, Buy it now and direct links

Shopify's Help Center says accelerated checkout buttons don't support cart attributes, and gives terms checkboxes as an example. In practice:

Path to checkout

Skips a cart checkbox?

Free fix

Express buttons in the cart (Shop Pay, Apple Pay, Google Pay, PayPal)

Yes

Remove content_for_additional_checkout_buttons from the cart, or hide/disable those buttons until the box is ticked

"Buy it now" / dynamic checkout on product pages

Yes

Theme editor → product template → Buy buttons → untick Show dynamic checkout buttons

Direct /checkout links, buy-now links in ads or emails

Yes

No theme fix

Customers who turn off JavaScript or edit the page

Yes

No theme fix

Hiding express buttons can cost you conversions, so it's a trade-off. The only way to close these gaps for every route is a rule that runs at checkout:

  • A Plus checkout UI extension with a required checkbox, or
  • A Cart and Checkout Validation Function that blocks checkout when the consent attribute is missing. Functions can be used by public apps on any plan.

Option 2: Shopify Plus checkout extension

On Plus you can add a required checkbox block inside checkout (for example, above the payment step) with a checkout UI extension. Because every route ends at checkout, this also covers express buttons and direct links. You'll need a developer or an app that provides the block.

Consent and chargebacks: what actually helps

Shopify's chargeback guidance asks for "the terms the customer agreed to at checkout". Be realistic about what a checkbox can do:

  • It helps in policy disputes, where the customer admits the purchase but disputes the terms: returns, cancellations, "credit not processed". There, a timestamped acceptance tied to the order supports your case.
  • It usually doesn't help in fraud disputes ("I didn't make this purchase"). Ticking a box doesn't prove who ticked it.
  • You can't backfill consent for past orders. Start recording it now.

Build a paper trail that holds up:

  1. Record the consent on the order (cart attribute), ideally with a time and the version of the terms.
  2. Keep dated copies of your policy pages, so you can show what the terms said on the purchase date.
  3. Put your refund and cancellation terms, with a link, in the order confirmation email.
  4. Keep support emails where you restated the policy.

Distance sales agreements (Turkey and the EU)

Turkey and many EU countries expect the customer to see and accept the contract terms before ordering. In Turkey, that means the mesafeli satış sözleşmesi. A required cart checkbox linking to the agreement page is the usual Shopify setup outside Plus. Many merchants also send the agreement after the order. Check the exact requirements with a lawyer. A checkbox helps you comply, but it doesn't guarantee compliance on its own.

Option 3: Use an app

If you'd rather not maintain theme code, several App Store apps add the checkbox to the cart and drawer. Before you choose one, check that it:

  • Works in the cart drawer, not just the cart page
  • Handles express and Buy it now buttons
  • Blocks checkout server-side (checkout validation), not only in the theme
  • Saves consent on the order, ideally with a time and terms version
  • Supports your languages

Our app, Lilya: Terms & Checkbox ($1.99/month), adds the cart and drawer checkbox, plus a checkout validation rule. The rule also blocks express checkout and Buy it now when consent is missing. It saves a versioned consent on each order. Like any Shopify Functions approach, it doesn't cover POS orders, order edits or subscription renewals.

FAQ

Can I add a terms checkbox to Shopify checkout without Plus? Not inside checkout. Use the cart page and drawer, and block checkout with a validation rule if you need it enforced.

Why doesn't my terms checkbox work with Shop Pay? Express buttons skip the cart form and don't carry cart attributes. Hide them until the box is ticked, or enforce consent at checkout.

Is the checkbox legally required? It depends on your country and what you sell. This guide isn't legal advice.