A simple ecommerce API for any website

Most ecommerce APIs are built for platforms talking to platforms: hundreds of endpoints, OAuth apps, webhooks for everything. If you want to list products on a page and let someone pay, you need about three calls. This is what AddTheShop's API looks like and why it is shaped that way.

Two APIs, two keys

Storefront API, public, by publishable key (pk_ats_...). Safe in a web page. It can read the catalogue and start a checkout. Nothing else.

Merchant API, by secret key (sk_ats_...) or an OAuth token. It manages the shop: products, settings, orders. Never goes in a page.

Read the catalogue

GET https://addtheshop.com/v1/storefront/pk_ats_STORE_KEY/products
{ "store": { "name": "Maria's Ceramics", "currency": "eur", "ready": true },
  "products": [ { "id": 12, "name": "Blue speckle mug", "price_cents": 2400, "price": "24.00", "currency": "eur", "image_url": "...", "in_stock": true, "stock": 12 } ] }

Start a checkout

POST https://addtheshop.com/v1/storefront/pk_ats_STORE_KEY/checkout
{ "items": [ { "product_id": 12, "quantity": 2 } ], "success_url": "https://yoursite.com/thanks", "cancel_url": "https://yoursite.com/shop" }

The response is { "url": "https://checkout.stripe.com/..." }. Redirect the buyer there. Prices and stock are taken from the database, never from the request, so a modified page cannot change what is charged.

Manage the shop

POST https://addtheshop.com/v1/products
Authorization: Bearer sk_ats_YOUR_SECRET_KEY
{ "name": "Blue speckle mug", "price": "24.00", "stock": 12, "image_url": "https://..." }

GET /v1/orders lists paid orders with items, totals and the shipping address. GET /v1/setup-status says what is missing before the shop can sell.

The same API for AI agents

Every merchant endpoint has a matching MCP tool, so Claude, ChatGPT or Cursor can do what a script can. Connect https://addtheshop.com/mcp by URL with OAuth, or use the secret key.

Why so small

Because a small shop does not need variants, fulfilment workflows, customer accounts and tax engines on day one, and every endpoint you do not have is one that cannot break. When you need more, your data is a short list you can export in a minute.

Questions

Is there a sandbox?

Connect a Stripe account in test mode and every checkout is a test checkout. Nothing else changes.

Do you have webhooks?

Orders are available by polling the merchant API or the MCP server. Outgoing webhooks are on the list.

Is there an SDK?

The API is small enough that fetch is the SDK. The agent guide has copy-paste examples.

Sell on the site you already have.

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

More guides