The Product object

Products describe the specific goods or services you offer to your customers. For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product. They can be used in conjunction with Prices to configure pricing in Payment Links, Checkout, and Subscriptions.

Stripe API equivalent
ENDPOINTS
POST /v1/products
POST /v1/products/:id
GET /v1/products/:id
GET /v1/products
DELETE /v1/products/:id

Attributes

id string

Unique identifier for the object. Zoneless product IDs are prefixed with prod_z_.

active boolean

Whether the product is currently available for purchase.

default_pricenullable string

The ID of the Price object that is the default price for this product.

descriptionnullable string

The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.

metadata object

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

name string

The product's name, meant to be displayable to the customer.

tax_codenullable string

A tax code ID. Expandable to the full Tax code object when you use the expand request parameter.

tax_detailsnullable object

Preview feature. Tax details for this product, including the tax code and an optional performance location.

More attributes

THE PRODUCT OBJECT
{
  "id": "prod_z_r3CvnB12vYj7exHh",
  "object": "product",
  "active": true,
  "created": 1778510761,
  "default_price": null,
  "description": null,
  "images": [],
  "marketing_features": [],
  "livemode": false,
  "metadata": {},
  "name": "Pro Plan",
  "package_dimensions": null,
  "shippable": null,
  "statement_descriptor": null,
  "tax_code": null,
  "unit_label": null,
  "updated": 1778510761,
  "url": null,
  "platform_account": "acct_z_Platform123abc",
}

Create a product

Creates a new product object.

Stripe API equivalent
ENDPOINTS
POST /v1/products

Parameters

name string Required

The product's name, meant to be displayable to the customer.

active boolean

Whether the product is currently available for purchase. Defaults to true.

description string

The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.

id string

An identifier will be randomly generated by Zoneless. You can optionally override this ID, but the ID must be unique across all products in your Zoneless account.

metadata object

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

tax_code string

A tax code ID.

tax_details object

Preview feature. Tax details for this product, including the tax code and an optional performance location.

More attributes

Returns

Returns a Product object if the call succeeds.

POST/v1/products
import { Zoneless } from '@zoneless/node';
const zoneless = new Zoneless('sk_live_z_YOUR_API_KEY', 'https://api.yourdomain.com');

const product = await zoneless.products.create({
  name: 'Pro Plan',
});
RESPONSE
{
  "id": "prod_z_r3CvnB12vYj7exHh",
  "object": "product",
  "active": true,
  "created": 1778510761,
  "default_price": null,
  "description": null,
  "images": [],
  "marketing_features": [],
  "livemode": false,
  "metadata": {},
  "name": "Pro Plan",
  "package_dimensions": null,
  "shippable": null,
  "statement_descriptor": null,
  "tax_code": null,
  "unit_label": null,
  "updated": 1778510761,
  "url": null,
  "platform_account": "acct_z_Platform123abc",
}

Update a product

Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Stripe API equivalent
ENDPOINTS
POST /v1/products/:id

Parameters

active boolean

Whether the product is currently available for purchase. Defaults to true.

default_price string

The ID of the Price object that is the default price for this product.

description string

The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.

metadata object

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

name string

The product's name, meant to be displayable to the customer.

tax_code string

A tax code ID.

tax_details object

Preview feature. Tax details for this product, including the tax code and an optional performance location.

More attributes

Returns

Returns the Product object if the update succeeds.

POST/v1/products/:id
import { Zoneless } from '@zoneless/node';
const zoneless = new Zoneless('sk_live_z_YOUR_API_KEY', 'https://api.yourdomain.com');

const product = await zoneless.products.update('prod_z_r3CvnB12vYj7exHh', {
  name: 'Pro Plan',
});
RESPONSE
{
  "id": "prod_z_r3CvnB12vYj7exHh",
  "object": "product",
  "active": true,
  "created": 1778510761,
  "default_price": null,
  "description": null,
  "images": [],
  "marketing_features": [],
  "livemode": false,
  "metadata": {},
  "name": "Pro Plan",
  "package_dimensions": null,
  "shippable": null,
  "statement_descriptor": null,
  "tax_code": null,
  "unit_label": null,
  "updated": 1778510761,
  "url": null,
  "platform_account": "acct_z_Platform123abc",
}

Retrieve a product

Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list. Zoneless returns the corresponding product information.

Stripe API equivalent
ENDPOINTS
GET /v1/products/:id

Parameters

No parameters.

Returns

Returns a Product object if you provide a valid identifier. Raises an error otherwise.

GET/v1/products/:id
import { Zoneless } from '@zoneless/node';
const zoneless = new Zoneless('sk_live_z_YOUR_API_KEY', 'https://api.yourdomain.com');

const product = await zoneless.products.retrieve('prod_z_r3CvnB12vYj7exHh');
RESPONSE
{
  "id": "prod_z_r3CvnB12vYj7exHh",
  "object": "product",
  "active": true,
  "created": 1778510761,
  "default_price": null,
  "description": null,
  "images": [],
  "marketing_features": [],
  "livemode": false,
  "metadata": {},
  "name": "Pro Plan",
  "package_dimensions": null,
  "shippable": null,
  "statement_descriptor": null,
  "tax_code": null,
  "unit_label": null,
  "updated": 1778510761,
  "url": null,
  "platform_account": "acct_z_Platform123abc",
}

List all products

Returns a list of products. The products are returned in sorted order, with the most recently created products appearing first.

ENDPOINTS
GET /v1/products

Parameters

active boolean

Only return products that are active or inactive (e.g., pass false to list all inactive products).

More attributes

Returns

A dictionary with a data property that contains an array of up to limit products. If no more products are available, the resulting array will be empty.

GET/v1/products
import { Zoneless } from '@zoneless/node';
const zoneless = new Zoneless('sk_live_z_YOUR_API_KEY', 'https://api.yourdomain.com');

const products = await zoneless.products.list({
  limit: 3,
});
RESPONSE
{
  "object": "list",
  "url": "/v1/products",
  "has_more": false,
  "data": [
    {
     "id": "prod_z_r3CvnB12vYj7exHh",
     "object": "product",
     "active": true,
     "created": 1778510761,
     "default_price": null,
     "description": null,
     "images": [],
     "marketing_features": [],
     "livemode": false,
     "metadata": {},
     "name": "Pro Plan",
     "package_dimensions": null,
     "shippable": null,
     "statement_descriptor": null,
     "tax_code": null,
     "unit_label": null,
     "updated": 1778510761,
     "url": null,
     "platform_account": "acct_z_Platform123abc",
    }
  ]
}

Delete a product

Deletes an existing product.

ENDPOINTS
DELETE /v1/products/:id

Parameters

No parameters.

Returns

Returns the deleted Product object with a deleted property set to true.

DELETE/v1/products/:id
import { Zoneless } from '@zoneless/node';
const zoneless = new Zoneless('sk_live_z_YOUR_API_KEY', 'https://api.yourdomain.com');

const deleted = await zoneless.products.del('prod_z_r3CvnB12vYj7exHh');
RESPONSE
{
  "id": "prod_z_r3CvnB12vYj7exHh",
  "object": "product",
  "deleted": true
}