POST
/
products
JavaScript
import DodoPayments from 'dodopayments';

const client = new DodoPayments({
  bearerToken: 'My Bearer Token',
});

const product = await client.products.create({
  price: { currency: 'AED', discount: 0, price: 0, purchasing_power_parity: true, type: 'one_time_price' },
  tax_category: 'digital_products',
});

console.log(product.brand_id);
{
  "addons": [
    "<string>"
  ],
  "brand_id": "<string>",
  "business_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "digital_product_delivery": null,
  "image": "<string>",
  "is_recurring": true,
  "license_key_activation_message": "<string>",
  "license_key_activations_limit": 123,
  "license_key_duration": null,
  "license_key_enabled": true,
  "metadata": {},
  "name": "<string>",
  "price": {
    "currency": "AED",
    "discount": 123,
    "pay_what_you_want": true,
    "price": 123,
    "purchasing_power_parity": true,
    "suggested_price": 123,
    "tax_inclusive": true,
    "type": "one_time_price"
  },
  "product_id": "<string>",
  "tax_category": "digital_products",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
price
object
required

Price configuration for the product One-time price details.

tax_category
enum<string>
required

Tax category applied to this product

Available options:
digital_products,
saas,
e_book,
edtech
addons
string[] | null

Addons available for subscription product

brand_id
string | null

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

description
string | null

Optional description of the product

digital_product_delivery
object | null

Choose how you would like you digital product delivered

license_key_activation_message
string | null

Optional message displayed during license key activation

license_key_activations_limit
integer | null

The number of times the license key can be activated. Must be 0 or greater

license_key_duration
object | null

Duration configuration for the license key. Set to null if you don't want the license key to expire. For subscriptions, the lifetime of the license key is tied to the subscription period

license_key_enabled
boolean | null

When true, generates and sends a license key to your customer. Defaults to false

metadata
object

Additional metadata for the product

name
string | null

Optional name of the product

Response

Product Created Successfully

brand_id
string
required
business_id
string
required

Unique identifier for the business to which the product belongs.

created_at
string<date-time>
required

Timestamp when the product was created.

is_recurring
boolean
required

Indicates if the product is recurring (e.g., subscriptions).

license_key_enabled
boolean
required

Indicates whether the product requires a license key.

metadata
object
required

Additional custom data associated with the product

price
object
required

Pricing information for the product. One-time price details.

product_id
string
required

Unique identifier for the product.

tax_category
enum<string>
required

Tax category associated with the product.

Available options:
digital_products,
saas,
e_book,
edtech
updated_at
string<date-time>
required

Timestamp when the product was last updated.

addons
string[] | null

Available Addons for subscription products

description
string | null

Description of the product, optional.

digital_product_delivery
object | null
image
string | null

URL of the product image, optional.

license_key_activation_message
string | null

Message sent upon license key activation, if applicable.

license_key_activations_limit
integer | null

Limit on the number of activations for the license key, if enabled.

license_key_duration
object | null

Duration of the license key validity, if enabled.

name
string | null

Name of the product, optional.