## Browse Products

Fetch a paginated list of products:

```ts
const products = await commerce.productBrowse({
  limit: 10,
  offset: 0,
});
```

### Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `limit` | `number` | Max items to return (default: 20) |
| `offset` | `number` | Number of items to skip |
| `collectionSlug` | `string` | Filter by collection |
| `categorySlug` | `string` | Filter by category |

## Get a Product

Fetch a single product by ID or slug:

```ts
const product = await commerce.productGet({
  idOrSlug: "classic-tee",
});
```

### Response

```ts
{
  id: "prod_abc123",
  name: "Classic Tee",
  slug: "classic-tee",
  summary: "A comfortable everyday tee",
  description: "Full markdown description...",
  images: ["https://..."],
  taxRate: { id: "tax_abc", name: "Standard VAT", rate: 23, label: null },
  variants: [
    {
      id: "var_xyz",
      sku: "CT-SM-BLK",
      price: "2500",       // net, in cents
      priceGross: "3075",  // gross, in cents
      name: "Small / Black",
      inventory: 42,
    }
  ],
  collections: [...],
  categories: [...],
}
```

## Displaying Prices

Prices are stored net. Every variant also carries a gross twin — `priceGross`, plus `originalPriceGross`, `calculatedPriceGross`, and `prePromotionPriceGross` — so the storefront never computes tax itself. Which one to render is decided by the store's tax behavior:

```ts
const { store } = await commerce.meGet();
const shown = store.taxBehavior === "inclusive" ? variant.priceGross : variant.price;
```

`inclusive` means shoppers see gross prices with tax included; `exclusive` means they see net prices and tax is added at checkout. With no tax rate assigned, gross equals net. See [Prices and tax](/docs/api-reference/products#prices-and-tax) for the full field list.

## Create a Product

```ts
const product = await commerce.productCreate({
  name: "New Product",
  slug: "new-product",
  summary: "A great new product",
  description: "Detailed description in markdown",
});
```

## Update a Product

```ts
const updated = await commerce.productUpdate(
  { idOrSlug: "new-product" },
  { name: "Updated Product Name" },
);
```

## Delete a Product

```ts
await commerce.productDelete({ idOrSlug: "new-product" });
```

## Working with Variants

Products have variants for different options (size, color, etc.). Manage variants with dedicated methods:

```ts
// Create a variant
await commerce.variantCreate(
  { idOrSlug: "classic-tee" },
  { sku: "CT-LG-RED", price: "2500", name: "Large / Red" },
);

// Update a variant
await commerce.variantUpdate(
  { idOrSku: "CT-LG-RED" },
  { price: "2900" },
);

// Delete a variant
await commerce.variantDelete({ idOrSku: "CT-LG-RED" });
```