Skip to main content
POST
/
product-collections
/
{id}
/
groups
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 productCollectionGroupResponse = await client.productCollections.groups.create('id', {
  products: [{ product_id: 'product_id' }],
});

console.log(productCollectionGroupResponse.group_id);
{
  "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>"
}

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.

Path Parameters

id
string
required

Product Collection Id

Body

application/json
products
object[]
required

Products in this group

group_name
string | null

Optional group name. Multiple groups can have null names, but named groups must be unique per collection

status
boolean | null

Status of the group (defaults to true if not provided)

Response

Group added successfully

group_id
string
required
products
object[]
required
status
boolean
required
group_name
string | null
Last modified on May 21, 2026