Checkout

How to add a terms and conditions checkbox to Shopify (cart and checkout)

Add a required terms checkbox to your Shopify cart, see which checkout paths skip it, and keep proof of what each customer agreed to.

You can add a required terms checkbox to your cart on every Shopify plan. A checkbox inside checkout is only possible on Shopify Plus. A cart-only checkbox can be skipped by express buttons like Buy it now or Shop Pay, and in a dispute it only helps if you kept a record of what the customer accepted.

Shopify links your terms in the checkout footer once you add them under Settings > Policies. But a link doesn't record that anyone agreed. This guide isn't legal advice: ask a lawyer what your terms must say.

Add a required checkbox to your cart

These steps are for Dawn and themes built on it. Other themes may use different file names.

  1. Go to Online Store > Themes, click ... next to your live theme and choose Duplicate. Work on the copy.
  2. On the copy, click ... > Edit code.
  3. Open sections/main-cart-footer.liquid, or the file that holds your cart's checkout button.
  4. Paste the snippet below just above the checkout button and save.
  5. Change the value to your own terms version. Update it every time your terms change.
  6. Test: place a test order with the box ticked, then open the order in your admin and look for "Accepted terms" under Additional details.
  7. Publish the copy.
<p class="cart-terms">
  <input
    type="checkbox"
    id="cart-terms"
    name="attributes[Accepted terms]"
    value="Terms of service, version 2026-10"
    form="cart"
    required
  >
  <label for="cart-terms">
    I have read and agree to the
    <a href="{{ shop.terms_of_service.url }}" target="_blank">terms of service</a>.
  </label>
</p>

What the parts do:

  • required: the browser won't submit the cart until the box is ticked.
  • form="cart": connects the checkbox to the cart form, even when it sits outside the <form> tag.
  • name="attributes[Accepted terms]": saves the value as a cart attribute, which carries over to the order.

Limits of this approach:

  • A cart drawer usually needs its own checkbox, or you turn the drawer off.
  • A theme update can replace the file. Check the checkbox after every update.
  • It saves a version label, not the full text or an acceptance time.

How customers skip the cart checkbox

The checkbox only works when the customer clicks your cart's checkout button. Here are the ways around it, and what to do about each:

  • Buy it now and wallet buttons on product pages (Shop Pay, Apple Pay, Google Pay, PayPal). Go to Online Store > Themes > Customize, open a product template, click Buy buttons in the Product information section and deselect Show accelerated checkout buttons. Do the same in any Featured product section.
  • Wallet buttons in the cart. They don't submit your cart form, so required doesn't stop them. Some themes let you hide them in the theme editor. Others need a code change.
  • Cart drawers and popups with their own checkout button. Add the checkbox there, or turn them off.
  • Direct checkout links, like cart links in emails or ads. Only a check at checkout catches these.

Hiding express buttons can lower conversion. Decide if that trade is worth it for your products.

What blocking at checkout takes

  • Any plan: a public App Store app with a Cart and Checkout Validation Function. It runs on Shopify's servers and can stop an order, including Shop Pay, PayPal, Google Pay and Apple Pay orders. Custom apps with functions need Plus.
  • Plus only: a Checkout UI extension can show the checkbox inside checkout. Since January 26, 2026, extensions only block checkout if you turn on Allow app to block checkout in the checkout editor.

A function doesn't show a checkbox. It only checks that agreement was recorded, so a customer who used Buy it now and never saw a checkbox gets blocked. Below Plus, you choose between hiding express buttons and letting some orders through without agreement.

What proof to keep for disputes

For each order, keep:

  • The exact text shown next to the checkbox, and the version of the terms it linked to.
  • The time of agreement. An acceptance timestamp is best. The order's creation time is a fallback.
  • The order number.
  • The customer who placed it.

Shopify keeps past policy versions for two years. Export them under Settings > Policies > Get past policies.

Disputes can arrive months later, so keep your records that long. A checkbox is one piece of evidence and doesn't guarantee you win.

Check your current setup

Use a test payment method or a cheap product you can refund.

  • Try to check out without ticking the box. You should be stopped.
  • Tick the box, place an order, and find the acceptance on the order.
  • In a private window, place a test order through every button that skips the cart: Buy it now, Shop Pay, Apple Pay, Google Pay, PayPal.
  • Repeat the first test in your cart drawer, if you have one.
  • Change the terms version and confirm new orders save the new one.

If any path finishes without a record, remove that path or block it at checkout.

Using an app: ConsentGuard

I built ConsentGuard for this, so keep that in mind. It adds a cart block on every plan and records the text shown, the time and the order, with CSV export.

Blocking checkout is optional and off by default, because it also blocks express buyers who skipped the cart. On Plus, the checkbox can also appear inside checkout.

Sources