Products

Products are the items or services that you sell to customers. Each product can have multiple prices and can be associated with discounts. Products contain information like name, description, images, and metadata, but the actual pricing information is stored separately in Price objects.

The Product object

Name
object
Type
"product",
Description
Literal representing the object’s type.
Name
id
Type
string,
Description
Unique identifier for the object.
Name
live
Type
boolean,
Description
Has the value true if the object exists in a production environment or the value false if the object exists in a sandbox environment.
Name
created_at
Type
integer,
Description
Time at which the object was created. Measured in milliseconds since the Unix epoch.
Name
active
Type
boolean,
Description
Whether the product can be used for new purchases.
Name
default_price
Type
string or Price or null,
Description
Expandable. The default price for this product.
Name
deleted
Type
boolean,
Description
Whether the product has been deleted.
Name
description
Type
string or null,
Description
An optional description of the product.
Name
images
Type
array of Files or null,
Description
Visual media representing the product.
Name
metadata
Type
object,
Description
A key-value store that is attached to the object. Useful for storing miscellaneous structured data for your integration’s internal use.
Name
name
Type
string,
Description
The product's name.
Name
prices
Type
array of Prices or null or null,
Description
Expandable. All prices for this product.
Name
updated_at
Type
integer,
Description
Time at which the object was last updated. Measured in milliseconds since the Unix epoch.

The Product object

{
  "object": "product",
  "id": "prod_KDCnId9DMZSOA9MSaut4Q",
  "live": false,
  "created_at": 1750000000000,
  "updated_at": 1750000000000,
  "deleted": false,
  "name": "Cosmos",
  "description": "Light roast coffee beans",
  "active": true,
  "default_price": null,
  "prices": null,
  "images": [],
  "metadata": {}
}

Create a product

Creates a new product.

Required parameters

Name
name
Type
string,
Description
The product's name.

Optional parameters

Name
description
Type
string or null,
Description
An optional description of the product.
Name
active
Type
boolean or null,
Description
Whether the product can be used for new purchases.
Name
images
Type
array of string or null,
Description
Visual media representing the product.
Name
metadata
Type
object or null,
Description
A key-value store that is attached to the object. Useful for storing miscellaneous structured data for your integration’s internal use.

Returns

Returns the product object.

Create a product

const product = await bias.products.create({
  name: "Cosmos",
  description: "Light roast coffee beans"
});

Response example

{
  "object": "product",
  "id": "prod_KDCnId9DMZSOA9MSaut4Q",
  "live": false,
  "created_at": 1750000000000,
  "updated_at": 1750000000000,
  "deleted": false,
  "name": "Cosmos",
  "description": "Light roast coffee beans",
  "active": true,
  "default_price": null,
  "prices": null,
  "images": [],
  "metadata": {}
}

Get a product

Retrieve a product by its ID.

Optional parameters

Name
expand
Type
object,
Description
Optional object that allows you to expand certain ID fields to include related resources.
Properties

Returns

Returns the product object.

Retrieve a product

const product = await bias.products.get("id");

Response example

{
  "object": "product",
  "id": "prod_KDCnId9DMZSOA9MSaut4Q",
  "live": false,
  "created_at": 1750000000000,
  "updated_at": 1750000000000,
  "deleted": false,
  "name": "Cosmos",
  "description": "Light roast coffee beans",
  "active": true,
  "default_price": null,
  "prices": null,
  "images": [],
  "metadata": {}
}

Update a product

Updates the specified product by setting the values of the parameters passed.

Optional parameters

Name
name
Type
string,
Description
The product's name.
Name
description
Type
string or null,
Description
An optional description of the product.
Name
active
Type
boolean,
Description
Whether the product can be used for new purchases.
Name
default_price
Type
string or null,
Description
The ID of the default price for this product.
Name
images
Type
array of string or null,
Description
Visual media representing the product.
Name
metadata
Type
object or null,
Description
A key-value store that is attached to the object. Useful for storing miscellaneous structured data for your integration’s internal use.

Returns

Returns the updated product object.

Update a product

const product = await bias.products.update("id", {
  name: "Summer 2026 Cotton Tee",
  active: false
});

Response example

{
  "object": "product",
  "id": "prod_KDCnId9DMZSOA9MSaut4Q",
  "live": false,
  "created_at": 1750000000000,
  "updated_at": 1750000000000,
  "deleted": false,
  "name": "Cosmos",
  "description": "Light roast coffee beans",
  "active": true,
  "default_price": null,
  "prices": null,
  "images": [],
  "metadata": {}
}

List all products

Returns a list of your products. Products are returned in reverse chronological order, with the most recently created products appearing first.

Optional parameters

Name
expand
Type
object,
Description
Optional object that allows you to expand certain ID fields to include related resources.
Properties
Name
ending_before
Type
string,
Description
A cursor for use in pagination. ending_before is an object ID that results will end before. Used to move backward through the list.
Name
starting_after
Type
string,
Description
A cursor for use in pagination. starting_after is an object ID that results will start after. Used to move forward through the list.
Name
limit
Type
number, at least 1, at most 1000, default is 50
Description
Maximum number of objects to return.
Name
filters
Type
object, object, or object,
Description
Filters to apply to the list. Combine multiple conditions with and and or.
Properties

Returns

Returns a list of product objects.

List all products

const product = await bias.products.list();

Response example

{
  "object": "list",
  "items": {
    "object": "product",
    "id": "prod_KDCnId9DMZSOA9MSaut4Q",
    "live": false,
    "created_at": 1750000000000,
    "updated_at": 1750000000000,
    "deleted": false,
    "name": "Cosmos",
    "description": "Light roast coffee beans",
    "active": true,
    "default_price": null,
    "prices": null,
    "images": [],
    "metadata": {}
  },
  "has_more": false
}

Delete a product

Deletes a product. Deleted products cannot be retrieved or used for new purchases, but existing prices associated with the product will continue to work until they are also deleted.

Returns

A deleted object stub.

Delete a product

const product = await bias.products.delete("id");

Response example

{
  "object": "product",
  "id": "prod_KDCnId9DMZSOA9MSaut4Q",
  "deleted": true
}
Previous
Next

Created by Bias in California