# Products

> What you sell. A product groups one or more prices.

Source: https://docs.borga.is/api/products

**The product object**

- `id` (string): Prefixed `prod_`.
- `name` (string): - `description` (string | null) <Param name="active" type="boolean">Inactive products cannot get new subscriptions.
- `metadata` (object)
- `created_at` (timestamp)
- `updated_at` (timestamp)

## Create a product

`POST /v1/products`

**Body**

- `name` (string)
- `description` (string)
- `metadata` (object)

```ts Node.js
const product = await borga.products.create({
  name: "Pro plan",
  description: "Everything in Starter plus priority support",
});

const monthly = await borga.prices.create({
  product: product.id,
  type: "recurring",
  currency: "ISK",
  unit_amount: 4990, // 4.990 kr. per seat per month
  recurring: { interval: "month", interval_count: 1 },
});

const yearly = await borga.prices.create({
  product: product.id,
  type: "recurring",
  currency: "ISK",
  unit_amount: 49900,
  recurring: { interval: "year" },
});
```

## Retrieve a product

`GET /v1/products/:id`

## Update a product

`PATCH /v1/products/:id`

**Body**

- `name` (string)
- `description` (string)
- `active` (boolean)
- `metadata` (object)

## List products

`GET /v1/products`

**Query parameters**

- `limit` (integer)
- `starting_after` (string)
