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

API reference

Endpoints, limits, versioning and the SDK surface.

Endpoints

PathAuth
Storefront API/v1/storefront/*Publishable key
Downloads/v1/downloads/:tokenNone — single use, ten minutes
Developer console/commerce/developers/*Workspace session

Limits

Rate limit600 requests per minute per key, by default
HeadersMercestack-RateLimit-Limit, Mercestack-RateLimit-Remaining
Request idMercestack-Request-Id, on every response
Page size24 by default, 100 maximum

SDK surface

// Simple
mercestack.getStore()
mercestack.getProducts(query)      mercestack.getProduct(handleOrId)
mercestack.search(term)            mercestack.getCollections()
mercestack.getCategories()

mercestack.getCart()               mercestack.addToCart(input)
mercestack.updateCartItem(id, n)   mercestack.removeFromCart(id)
mercestack.clearCart()             mercestack.applyDiscount(code)
mercestack.applyGiftCard(code)     mercestack.removeGiftCard(id)
mercestack.setCustomer(input)      mercestack.setShippingAddress(address)

mercestack.checkout(input)         mercestack.openCheckout(input)
mercestack.getLibrary(token)       mercestack.getDownloadUrl(token, id)
mercestack.on(event, listener)

// Namespaced — the same operations, named after what they touch
mercestack.products.list()         mercestack.products.retrieve(handle)
mercestack.cart.addItem()          mercestack.cart.token()
mercestack.collections.list()      mercestack.library.download()

Namespaced methods are bound, so const { addItem } = mercestack.cart works — a destructured method that loses its this is the most common way an SDK surprises someone.

Versioning

/v1 is a promise. Your storefront renders these field names, so renaming one would be an outage on your website, not ours. New fields are added freely; renames and removals mean a new version, and the old one keeps working.

Events you can listen to

const off = mercestack.on("cart.updated", (cart) => {
  setCount(cart.itemCount);
});

off();  // on() returns its own unsubscribe

// cart.created · cart.updated · cart.cleared
// checkout.started · order.completed
PreviousWithout a build step
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