Skip to main content
POST
/
product-collections
JavaScript
import DodoPayments from 'dodopayments';

const client = new DodoPayments({
  bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});

const productCollection = await client.productCollections.create({
  groups: [{ products: [{ product_id: 'product_id' }] }],
  name: 'name',
});

console.log(productCollection.id);
{
  "brand_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "groups": [
    {
      "group_id": "<string>",
      "products": [
        {
          "addons_count": 123,
          "files_count": 123,
          "has_credit_entitlements": true,
          "id": "<string>",
          "is_recurring": true,
          "license_key_enabled": true,
          "meters_count": 123,
          "product_id": "<string>",
          "status": true,
          "description": "<string>",
          "name": "<string>",
          "price": 123,
          "price_detail": {
            "discount": 123,
            "price": 123,
            "purchasing_power_parity": true,
            "pay_what_you_want": true,
            "suggested_price": 123,
            "tax_inclusive": true
          },
          "tax_inclusive": true
        }
      ],
      "status": true,
      "group_name": "<string>"
    }
  ],
  "id": "<string>",
  "name": "<string>",
  "updated_at": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "image": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.dodopayments.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
groups
object[]
required

Groups of products in this collection

name
string
required

Name of the product collection

brand_id
string | null

Brand id for the collection, if not provided will default to primary brand

description
string | null

Optional description of the product collection

Response

Product Collection Created Successfully

brand_id
string
required

Brand ID for the collection

created_at
string<date-time>
required

Timestamp when the collection was created

groups
object[]
required

Groups in this collection

id
string
required

Unique identifier for the product collection

name
string
required

Name of the collection

updated_at
string<date-time>
required

Timestamp when the collection was last updated

description
string | null

Description of the collection

image
string | null

URL of the collection image

Last modified on May 21, 2026