Prices

Prices define how much and how often to charge for products. Each price belongs to exactly one product, but products can have multiple prices (for example, different price points or currencies). Prices are used when creating checkout sessions or line items.

The Price object

Name
object
Type
"price",
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 price can be used for new purchases.
Name
amount
Type
integer, at least 0,
Description
The price in cents
Name
deleted
Type
boolean,
Description
Whether the price has been deleted.
Name
description
Type
string or null,
Description
A short description of the price for internal use. Price descriptions are not shown to customers.
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
product
Type
string or Product,
Description
The product that this price is attached to.
Name
type
Type
enum,
Description
The price type.
Name
updated_at
Type
integer,
Description
Time at which the object was last updated. Measured in milliseconds since the Unix epoch.

The Price object

{
  "object": "price",
  "id": "price_dz1NVvl5CSogERkeA9Ng67",
  "live": false,
  "created_at": 1750000000000,
  "updated_at": 1750000000000,
  "deleted": false,
  "product": "prod_KDCnId9DMZSOA9MSaut4Q",
  "active": true,
  "description": "Standard price",
  "amount": 2999,
  "type": "one_time",
  "metadata": {}
}

Create a price

Creates a new price for a product.

Required parameters

Name
product
Type
string,
Description
The product this price belongs to
Name
amount
Type
integer, at least 0,
Description
The price in cents

Optional parameters

Name
active
Type
boolean or null,
Description
Whether the price can be used for new purchases.
Name
description
Type
string or null,
Description
A short description of the price for internal use. Price descriptions are not shown to customers.
Name
type
Type
enum, default is one_time
Description
The price type.
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 price object.

Create a price

const price = await bias.prices.create({
  product: "price_dz1NVvl5CSogERkeA9Ng67",
  active: true,
  description: "Standard price",
  amount: 2999,
  type: "one_time",
  metadata: {}
});

Response example

{
  "object": "price",
  "id": "price_dz1NVvl5CSogERkeA9Ng67",
  "live": false,
  "created_at": 1750000000000,
  "updated_at": 1750000000000,
  "deleted": false,
  "product": "prod_KDCnId9DMZSOA9MSaut4Q",
  "active": true,
  "description": "Standard price",
  "amount": 2999,
  "type": "one_time",
  "metadata": {}
}

Get a price

Retrieve a price 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 price object.

Retrieve a price

const price = await bias.prices.get("id");

Response example

{
  "object": "price",
  "id": "price_dz1NVvl5CSogERkeA9Ng67",
  "live": false,
  "created_at": 1750000000000,
  "updated_at": 1750000000000,
  "deleted": false,
  "product": "prod_KDCnId9DMZSOA9MSaut4Q",
  "active": true,
  "description": "Standard price",
  "amount": 2999,
  "type": "one_time",
  "metadata": {}
}

Update a price

Updates the specified price by setting the values of the parameters passed. Note that you cannot update the product, amount, or type of an existing price.

Optional parameters

Name
active
Type
boolean,
Description
Whether the price can be used for new purchases.
Name
description
Type
string or null,
Description
A short description of the price for internal use. Price descriptions are not shown to customers.
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 price object.

Update a price

const price = await bias.prices.update("id", {
  active: false,
  name: "Intro rate",
  metadata: {}
});

Response example

{
  "object": "price",
  "id": "price_dz1NVvl5CSogERkeA9Ng67",
  "live": false,
  "created_at": 1750000000000,
  "updated_at": 1750000000000,
  "deleted": false,
  "product": "prod_KDCnId9DMZSOA9MSaut4Q",
  "active": true,
  "description": "Standard price",
  "amount": 2999,
  "type": "one_time",
  "metadata": {}
}

List all prices

Returns a list of your prices. Prices are returned in reverse chronological order, with the most recently created prices 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 price objects.

List all prices

const price = await bias.prices.list();

Response example

{
  "object": "list",
  "items": {
    "object": "price",
    "id": "price_dz1NVvl5CSogERkeA9Ng67",
    "live": false,
    "created_at": 1750000000000,
    "updated_at": 1750000000000,
    "deleted": false,
    "product": "prod_KDCnId9DMZSOA9MSaut4Q",
    "active": true,
    "description": "Standard price",
    "amount": 2999,
    "type": "one_time",
    "metadata": {}
  },
  "has_more": false
}