Add a shopping cart to a plain HTML website

You have an HTML site. Maybe hand written, maybe exported, maybe hosted on GitHub Pages or Netlify. You want a cart and a checkout, and every search result wants you to migrate to a platform. You do not have to. Two lines of HTML give you a product grid, a cart and Stripe checkout.

The two lines

<script src="https://addtheshop.com/shop.js" data-store="pk_ats_YOUR_STORE_KEY" async></script>
<div id="addtheshop"></div>

Put them where the products should appear. The script loads async and renders the grid into the div. A floating cart bar appears when something is added, and "Pay with Stripe" opens Stripe's hosted checkout on your own Stripe account.

Buy buttons on your own pages

Already have a page per product? Keep the script tag on those pages and give any button data-addtheshop-buy="PRODUCT_ID". Clicking adds the item and opens the cart.

Hosting

Anything that serves HTML works: GitHub Pages, Netlify, Cloudflare Pages, Vercel, an old shared host, an S3 bucket. There is no server code.

Styling

Set CSS variables on #addtheshop (--ats-accent, --ats-radius, --ats-font) or use data-theme="unstyled" and write your own CSS for the .ats-* classes.

Where products and orders live

In your AddTheShop dashboard, which you can also drive from Claude, ChatGPT or Cursor through MCP. Orders arrive by email with the buyer's address when you collect one.

Questions

Do I need PHP or a server?

No. Static HTML is enough. The snippet talks to our API and Stripe.

Is the store key safe to put in HTML?

Yes. It only allows reading your public catalogue and starting a checkout. The secret key for managing the shop is separate and never goes in a page.

Can I collect shipping addresses?

Yes. Turn it on in shop settings and Stripe asks for the address at checkout.

Add the shop to your plain HTML site.

Products, cart and Stripe checkout from one script tag. Free to start, 2% per sale. Your AI installs it and runs it.

Add the shop

See the live demo

Also works with

Compare