merce.STACK
merce.STACK
Skip to content
PricingDevelopersSecurityAbout
Log inGet started

Commerce API

  • Quickstart
  • Keys & authentication
  • Products & catalog
  • Carts
  • Checkout & payment
  • Digital products
  • Webhooks
  • Errors
  • Without a build step
  • API reference

Commerce API

Without a build step

A script tag and a data attribute. For WordPress, Webflow and plain HTML.

Most of the internet is not a React application. If your site is WordPress, a Webflow export, a theme you are migrating, or hand-written HTML, you do not need a bundler to sell through it.

<script src="https://cdn.mercestack.com/v1/commerce.js"></script>
<script>
  Mercestack.init({ publicKey: "pk_live_…" });
</script>

<button data-mercestack-buy="var_123">Buy now</button>

<button data-mercestack-add="var_123"
        data-mercestack-quantity="2">Add 2 to basket</button>

<a href="/cart">Basket (<span data-mercestack-cart-count>0</span>)</a>

Buttons are bound with a single delegated listener on the document, so products rendered *after* the page loads — infinite scroll, a filter that replaces the grid, a quick-view modal — work without rebinding anything.

  • —Buttons disable themselves while the request is in flight, so a double tap does not add two.
  • —Any [data-mercestack-cart-count] element is kept in step automatically.
  • —Failures fire a mercestack:error DOM event on the button rather than vanishing into an unhandled rejection.
PreviousErrorsNextAPI reference
Create a workspaceTalk to usPricing

The business operating system. One workspace for structure, customers, communication, money and the automation between them.

Create your workspace

Platform

  • Overview
  • Structure & work
  • Customers & communication
  • Finance & commerce
  • Flow & AI Workforce
  • Analytics & files

Developers

  • Documentation
  • Quickstart
  • Keys & authentication
  • Carts & checkout
  • Webhooks
  • API reference

Company

  • About
  • Pricing
  • Security
  • Contact
  • Report a vulnerability

Legal

  • Privacy
  • Terms
  • Cookie policy
  • GDPR
  • Privacy contact

© 2026 Mercestack. All rights reserved.

Mercestack StructureOS