Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.stella-commerce.com/llms.txt

Use this file to discover all available pages before exploring further.

By the end of this page you’ll have:
  1. Minted a Storefront Access Token in the dashboard.
  2. Listed products via the public API.
  3. Created a cart, added a line item, and produced a Stella-hosted checkout URL your customer can pay on.
Total time: ~5 minutes. No SDK required — curl is enough.
These examples target the staging environment at https://api-dev-app.stella-commerce.com. Once production is live the host will switch to https://api.stella-commerce.com.

Step 1 — Mint a Storefront Access Token

In the Stella dashboard, navigate to Settings → Storefront access tokens and click Create token.
  • Give it a name (local-dev or kasa-prod).
  • Add the origins your storefront will call from (e.g. https://kasa.com, http://localhost:3000). Origin enforcement is active when this list is non-empty.
  • Hit Create.
The token is shown once in a reveal modal as stk_live_…. Copy it now — Stella stores only the hash. You’ll also need your site_id (visible on the same page; example: kasa).

Step 2 — List products

curl -H "X-Site-ID: kasa" \
     -H "X-Stella-Token: stk_live_..." \
     https://api-dev-app.stella-commerce.com/api/storefront/products
Response shape (truncated):
{
  "items": [
    {
      "id": "01HXYZ...",
      "title": "Sherpa Beanie",
      "handle": "sherpa-beanie",
      "price": 950.00,
      "currency": "NPR",
      "variants": [
        { "id": "01HXYZ...A", "title": "Blue", "inventory": 6 }
      ]
    }
  ],
  "next_cursor": null
}
Pick a variant.id you want to add to the cart.

Step 3 — Create a cart and add an item

Cart creation is a POST with no body. The returned id is the cart identifier you’ll reference in subsequent calls.
curl -X POST \
     -H "X-Site-ID: kasa" \
     -H "X-Stella-Token: stk_live_..." \
     https://api-dev-app.stella-commerce.com/api/storefront/cart
{ "id": "cart_01HXYZ...", "items": [], "subtotal": 0, "currency": "NPR" }
Add a line item. The Idempotency-Key header makes this safe to retry — Stella replays the cached response on duplicate keys.
curl -X POST \
     -H "X-Site-ID: kasa" \
     -H "X-Stella-Token: stk_live_..." \
     -H "Idempotency-Key: $(uuidgen)" \
     -H "Content-Type: application/json" \
     -d '{"variant_id": "01HXYZ...A", "quantity": 1}' \
     https://api-dev-app.stella-commerce.com/api/storefront/cart/cart_01HXYZ.../items
{
  "id": "cart_01HXYZ...",
  "items_count": 1,
  "subtotal": 950.00,
  "checkout_url": "https://checkout-dev-app.stella-commerce.com/c/chk_..."
}

Step 4 — Redirect to checkout

Take the checkout_url from the response above and redirect the customer’s browser to it. Stella’s hosted checkout SPA handles shipping, payment (Stripe Payment Element), and confirmation. On success, an order.created webhook fires (see Webhooks).
// In your storefront code:
window.location.href = cart.checkout_url
That’s the full path from “merchant signs up” to “customer pays.”

What’s next

Customer accounts

Add login, address book, and order history with the Customer Account API.

Webhooks

Wire your fulfillment/email/analytics systems to Stella events.

Agent capability

Let AI agents act on a customer’s behalf, scoped and audited.

Full API reference

Every endpoint, every parameter, with try-it-out playground.