POST /items

Creates a new item.

Servers

Request headers

Name Type Required Description
chargebee-request-origin-device String No

The device from which the customer has made the request

Content-Type String Yes The media type of the request body.

Default value: "application/x-www-form-urlencoded"

chargebee-event-webhook String No

skip only webhooks

Possible values:

  • "all-disabled"
chargebee-business-entity-id String No

If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.

chargebee-event-actions String No

skip all actions to be done on the events

Possible values:

  • "all-disabled"
chargebee-request-origin-user String No

The email address of your customer/user. Use this when the email address has only ASCII characters.

chargebee-request-origin-ip String No

The IP address of the customer where the request originated

chargebee-request-origin-user-encoded String No

The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.

chargebee-event-email String No

skip only emails

Possible values:

  • "all-disabled"

Request body fields

Name Type Required Description
applicable_items[] Array No

The list of ids of addon-items and charge-items that can be applied to the plan-item. This parameter can be provided only for plan-items and that too when item_applicability is restricted. Other details of attaching items can be specified using the Create or Update an attached item API.

included_in_mrr Boolean No

The item is included in MRR calculations for your site. This attribute is only applicable for items of type = charge and when the feature is enabled in Chargebee. Note: If the site-level setting is to exclude charge-items from MRR calculations, this value is always returned false.

is_giftable Boolean No

Specifies if gift subscriptions can be created for this item.

Default value: false

description String No

Description of the item. This is visible only in Chargebee and not to customers.
Note :

  • The description field supports up to 2000 characters, including HTML tags. The inner text (excluding HTML tags) must not exceed 500 characters.
    For example:
    <ul><li>testing</li><li>desc</li></ul>.
    Total with tags: 38 characters,
    inner text: 'testing desc' (12 characters).
  • If your input includes characters requiring sanitization, such as incomplete HTML tags, the sanitization process may alter the input and increase its length. If the sanitized content exceeds the allowed limit, the request will be rejected.
metadata Object No

A collection of key-value pairs that provides extra information about the item. **Note:** There's a character limit of 65,535. [Learn more](advanced-features#metadata).

business_entity_id String No

The unique ID of the business entity for this item. This is applicable only when multiple business entities have been created for the site. When provided, the operation will read or write data associated with the specified business entity. If not provided, the resource will be created at the site level, and the business_entity_id will not be included in the API response.
Note

An alternative way of passing this parameter is by means of a custom HTTP header. .

enabled_for_checkout Boolean No

Allow the plan to subscribed to via Checkout. Applies only for plan-items.
Note: Only the in-app version of Checkout is supported for Product Catalog v2.

Default value: true

unit String No

The unit of measure for a quantity-based item. This is displayed on the Chargebee UI and on customer facing documents/pages. The latter includes hosted pages, invoices and quotes. Examples follow:

  • "user" for a cloud-collaboration platform.
  • "GB" for a data service.
  • "issue" for a magazine.
metered Boolean No

Specifies whether the item undergoes metered billing. When true, the quantity is calculated from usage records. When false, the quantity is as determined while adding an item price to the subscription. Applicable only for items of type plan or addon and when Metered Billing is enabled. The value of this attribute cannot be changed.

Default value: false

id String Yes

The identifier for the item. Must be unique and is immutable once set.

usage_calculation String No

How the quantity is calculated from usage data for the item prices belonging to this item. Only applicable when the item is metered. This value overrides the one set at the site level. . * sum_of_usages - the net quantity is the sum of the quantity of all usages for the current term. * last_usage - from among the usage records for the item price with usage_date within the relevant billing period, the quantity of the usage record with the most recent usage_date is taken as the net quantity consumed. * max_usage - from among the usage records for the item price with usage_date within the relevant billing period, the quantity of the usage record with the maximum value is taken as the net quantity consumed.

Possible values:

  • "max_usage"
  • "sum_of_usages"
  • "last_usage"
is_percentage_pricing Boolean No

Default value: false

name String Yes

A unique display name for the item. Must be unique. This is visible only in Chargebee and not to customers.

redirect_url String No

If enabled_for_checkout, then the URL to be redirected to once the checkout is complete. This attribute is only available for plan-items.

bundle_items_to_add Object No

Parameters for `bundle_items_to_add`

bundle_items_to_add.quantity[] Array No

Quantity of the item(plan, addon, and charge) associated with the bundle.

bundle_items_to_add.item_type[] Array No
bundle_items_to_add.price_allocation[] Array No

Price allocation of the item(plan, addon, and charge) associated with the bundle.

bundle_items_to_add.item_id[] Array No

item_id that needs to be added to the bundle.
Note: This parameter is only applicable when the item_type is plan.

external_name String No

A unique display name for the item.

bundle_configuration Object No

Parameters of `bundle_configuration`

bundle_configuration.type String No

Type of the bundle * fixed - Fixed bundle_configuration.type appears when you create a bundle plan that cannot be updated during checkout or subscription creation.

Possible values:

  • "fixed"
type String Yes

The type of the item. * plan - An essential component of a subscription. Every subscription has exactly one plan. It has a recurring charge and its period defines the billing period of the subscription. * charge - A non-recurring component that can be added to a subscription in addition to its plan. An charge can also be applied to a customer directly without being applied to a subscription. * addon - A recurring component that can be added to a subscription in addition to its plan.

Possible values:

  • "plan"
  • "charge"
  • "addon"
is_shippable Boolean No

Indicates that the item is a physical product. If Orders are enabled in Chargebee, subscriptions created for this item will have orders associated with them.

Default value: false

item_applicability String No

Indicates which addon-items and charge-items can be applied to the item. Only possible for plan-items. Other details of attaching items such as whether to attach as a mandatory item or to attach on a certain event, can be specified using the Create or Update an attached item API. * all - all addon-items and charge-items are applicable to this plan-item. * restricted - only the addon-items or charge-items provided in applicable_items can be applied to this plan-item.

Possible values:

  • "restricted"
  • "all"

Default value: "all"

gift_claim_redirect_url String No

The URL to redirect to once the gift has been claimed by the receiver.

item_family_id String Yes

The id of the Item family that the item belongs to. Is mandatory when Product Families have been enabled.

enabled_in_portal Boolean No

Allow customers to change their subscription to this plan via the Self-Serve Portal. Applies only for plan-items. This requires the Portal configuration to allow changing subscriptions. Only the in-app version of the Portal is supported for Product Catalog v2.

Default value: true

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.