How to Add a Terms and Conditions Checkbox to Your Shopify Cart (2026)
Summarize this article with AI
Add a required “I agree to the terms” checkbox to your Shopify cart page and drawer, save it on every order, and close the Shop Pay and Buy it now loopholes.
Short answer: on any Shopify plan, put the checkbox in the cart, just above the checkout button, and make it required. Store the answer as a cart attribute so it shows up on every order. Only Shopify Plus stores can put a checkbox inside the checkout itself, because checkout UI extensions for the information, shipping and payment steps are Plus-only(opens in a new tab). This guide covers both routes, the 10-minute code version for themes like Dawn, and the gaps you need to close so customers cannot skip it.
Cart or checkout: where can the checkbox go?
Shopify locks down its checkout. You cannot edit its HTML, so where your checkbox lives depends on your plan.
Location | Basic, Grow, Advanced | Shopify Plus | How |
|---|---|---|---|
Cart page | Yes | Yes | Theme code or an app |
Cart drawer | Yes | Yes | Theme code or an app |
Checkout (information, shipping, payment) | No | Yes | Checkout UI extension (app) |
Product page, before Buy it now | Yes | Yes | Theme code or an app |
If you are deciding whether checkout control is worth the upgrade, our Shopify plan comparison breaks down what Plus costs. For a terms checkbox alone, it is not worth it: the cart version covers most stores.
Before you start: publish your terms
A checkbox that links to nothing proves nothing. In your Shopify admin, go to Settings > Policies and fill in the Terms of service, Refund policy and Privacy policy. Once saved, Shopify:
- gives each policy its own URL, for example
/policies/terms-of-service; - lists the policies as links at the bottom of the checkout;
- exposes the terms to your theme as
shop.terms_of_service.url, which the snippet below uses.
Method 1: add the checkbox to the cart page with code
This works on Dawn and most Online Store 2.0 themes built from it (Refresh, Sense, Craft, Studio…). It takes no JavaScript. The browser blocks the checkout button until the box is ticked, because the checkbox is required.
Duplicate your theme first (Online Store > Themes > … > Duplicate) and work on the copy.
- In the admin, open Online Store > Themes > … > Edit code.
- Open
sections/main-cart-footer.liquidand find the checkout button:<button type="submit" id="checkout" … form="cart">. - Paste this line just above the
<div class="cart__ctas"that wraps the button:
<p class="cart__terms"><label><input type="checkbox" id="CartTerms" name="attributes[Terms accepted]" value="Yes" form="cart" required> I agree to the <a href="{{ shop.terms_of_service.url }}" target="_blank">terms and conditions</a></label></p>
- Save, open your cart and click Check out without ticking the box. The browser should stop you with its own “Please tick this box” message.
Why this snippet works
form="cart"attaches the checkbox to the cart form even though it sits outside it. Check theidof the<form>inmain-cart-items.liquid: on Dawn it iscart.requiredmakes the browser refuse to submit the form while the box is unticked. No script means nothing to break when the theme updates.name="attributes[Terms accepted]"saves the answer as a cart attribute. It appears under Additional details on the order in your admin, with no app and no database.- The box is never pre-ticked. A pre-ticked box is not consent.
Add it to the cart drawer too
If your theme opens a drawer instead of the cart page, customers check out from there and skip the cart page entirely. Paste the same line in snippets/cart-drawer.liquid, above the drawer’s cart__ctas block, and change two things: form="CartDrawer-Form" and id="CartDrawerTerms" (two inputs with the same id on one page break the label). Community answers for Dawn 14(opens in a new tab) use the same placement.
If the button still submits with the box unticked, the form carries a novalidate attribute. Remove it from that form, or ask your developer to block the click in JavaScript.
Close the gaps: the checkbox can still be skipped
A cart checkbox only guards the routes that go through the cart. Three routes go around it:
- Dynamic checkout buttons on the product page (Buy it now, Shop Pay, Apple Pay, Google Pay) jump straight to checkout. In the theme editor, open the product template, select the Buy buttons block and untick Show dynamic checkout buttons. Merchants regularly report this bypass(opens in a new tab).
- Express buttons on the cart page render from
content_for_additional_checkout_buttonsand also skip the form. Remove that block from the cart, or accept the gap. - Direct checkout links (buy-now links in emails or ads, abandoned cart emails) open checkout without the cart. Only a Plus checkout extension covers these.
Removing express buttons costs conversions, so weigh it. For most stores, the terms links Shopify already shows at checkout plus a cart checkbox is a reasonable balance.
Method 2: use an app
If you would rather not touch code, the Shopify App Store(opens in a new tab) has a dozen “terms checkbox” apps. They inject the checkbox in the cart page and drawer through an app embed, and some log the acceptance with a timestamp. Before installing one, check:
- that it supports your cart type (page, drawer, or both);
- whether it blocks express buttons, or only hides them;
- that it translates the label if you sell in several languages;
- its monthly price: for a single checkbox, the code above is free and loads nothing extra.
Method 3 (Shopify Plus): a checkbox inside the checkout
On Plus, an app can add a checkout UI extension with a checkbox block. The extension saves the answer with applyAttributeChange and, with the block_progress capability, stops the buyer from paying until the box is ticked (Shopify docs(opens in a new tab)). You add the block in Settings > Checkout > Customize and, in the app’s block settings, allow it to block checkout. This is the only setup that also covers express buttons and direct checkout links, since every route ends at the checkout.
Is a terms checkbox legally required?
Usually not as such, but it is the simplest way to prove that a customer accepted your terms. This is general information, not legal advice.
- United States: courts separate “clickwrap” (the customer actively ticks or clicks “I agree”) from “browsewrap” (terms linked in the footer). In Nguyen v. Barnes & Noble(opens in a new tab) (9th Cir. 2014), a footer link alone did not bind the buyer to the site’s arbitration clause. A required checkbox is clickwrap.
- France and the EU: under article 1119 of the French Civil Code(opens in a new tab), general terms only bind the other party if they were brought to their attention and accepted. The seller has to prove it. A ticked checkbox stored on the order is that proof.
If you sell digital products, subscriptions or custom-made items, the terms also carry your refund exceptions. That is where an explicit “I agree” matters most.
Frequently asked questions
Can I add a terms checkbox to Shopify checkout without Plus?
No. Checkout UI extensions on the information, shipping and payment steps are reserved for Shopify Plus. On other plans, the checkbox goes in the cart page, the cart drawer, or the product page.
Where do I see that a customer accepted the terms?
With the snippet in this guide, open the order in your Shopify admin. The answer is listed under Additional details as “Terms accepted: Yes”.
Does the checkbox work with Shop Pay and Apple Pay buttons?
Not on the cart or product page: express buttons go straight to checkout and skip it. Hide them, or use a Plus checkout extension that blocks progress at checkout.
Should the checkbox be ticked by default?
No. A pre-ticked box does not show that the customer agreed to anything. Leave it unticked and required.
Will the checkbox survive a theme update?
No, edits to theme files are not carried over when you install a new theme version. Keep the snippet somewhere safe and paste it back after each update, or use an app embed, which is independent of the theme code.

Keep reading
Shopify Post-Purchase Upsells: How One-Click Offers Work (+ 7 Examples)
A post-purchase upsell is a one-click offer shown after payment. It cannot cost you the order. Here is how it works on Shopify, what to offer and how to measure it.
BFCM 2026: Meaning, Dates and a Shopify Black Friday Checklist
BFCM means Black Friday Cyber Monday. Here are the 2026 dates and the Shopify checklist we use from October to December: offers, theme, cart, checkout and follow-up.
Shopify Canvas: What It Is and What It Means for Your Theme
Shopify Canvas is a new visual workspace where you design your store with Sidekick. Here is what it does, what it can't do yet, and what it means for your theme.
