Price variant resource offers businesses the flexibility to manage pricing for multiple variations of an item (plan, addon, or charge) in the Product Catalog. It enables the creation of diverse pricing structures based on variables such as geography, partners, versions, and more.
See also:
For a more detailed understanding of Price Variants, including how to enable, configure, and manage them, as well as their impact on other features, follow these resources:
Sample price variant [ JSON ]
{
"updated_at": 1709200385,
"name": "Germany Berlin",
"created_at": 1709200385,
"attributes": [
{
"name": "country",
"value": "germany"
},
{
"name": "city",
"value": "berlin"
}
],
"id": "germany-berlin",
"external_name": "Germany",
"resource_version": 1709200385728,
"status": "active",
"object": "price_variant"
}
API Index URL GET
https://{site}.chargebee.com/api/v2/price_variants
string, max chars=100 The unique and immutable identifier of the price variant.
string, max chars=100 A unique name of the price variant.
optional, string, max chars=100 A unique display name for the price variant.
optional, string, max chars=100 The variant_group
organizes similar price_variants
to optimize strategies such as bundling, geo-based pricing experiments, and campaign-specific pricing like cb-atomic-pricing-
for effective grouping. The variant_group
provides greater flexibility and precision in your pricing models.
optional, string, max chars=500 Description of the price variant.
optional, enumerated string Status of a price variant. Possible values are
activeActive price variant. This price variant can be attached to item prices.archivedArchived price variant. This price variant is no longer active
and cannot be attached to new item prices. Existing item prices that already have this price variant attached will continue to remain as is.deletedDeleted price variant. The id
and name
of the deleted price variant can be reused. Show all values[+]
timestamp(UTC) in seconds Timestamp indicating when this price variant is created.
optional, long The version number of this resource. For every change made to the resource, resource_version
is updated with a new timestamp in milliseconds.
optional, timestamp(UTC) in seconds Timestamp indicating when this price variant was last updated.
optional, timestamp(UTC) in seconds Timestamp indicating when this price variant was archived.
optional, string, max chars=50 The unique ID of the
business entity of this price_variant
. This is applicable only when multiple business entities have been created for the site. The value of this attribute indicates that the resource is specific to the given business entity.
boolean Indicates whether the price variant has been deleted or not. optional, list of attribute The list of price variant attribute values.
Attributes can be used to store additional information about the price variant. For example, for a price variant called ‘Germany’, the attributes can be ‘Country’:'Germany', ‘City’:'Berlin' and so on.
string, max chars=100 Attribute name
string, max chars=100 Attribute value
string, max chars=100 The unique and immutable identifier of the price variant.
string, max chars=100 A unique name of the price variant.
optional, string, max chars=100 A unique display name for the price variant.
optional, string, max chars=100 The variant_group
organizes similar price_variants
to optimize strategies such as bundling, geo-based pricing experiments, and campaign-specific pricing like cb-atomic-pricing-
for effective grouping. The variant_group
provides greater flexibility and precision in your pricing models.
optional, string, max chars=500 Description of the price variant.
optional, enumerated string Status of a price variant. Possible values are
activeActive price variant. This price variant can be attached to item prices.archivedArchived price variant. This price variant is no longer active
and cannot be attached to new item prices. Existing item prices that already have this price variant attached will continue to remain as is.deletedDeleted price variant. The id
and name
of the deleted price variant can be reused. Show all values[+]
timestamp(UTC) in seconds Timestamp indicating when this price variant is created.
optional, long The version number of this resource. For every change made to the resource, resource_version
is updated with a new timestamp in milliseconds.
optional, timestamp(UTC) in seconds Timestamp indicating when this price variant was last updated.
optional, timestamp(UTC) in seconds Timestamp indicating when this price variant was archived.
optional, string, max chars=50 The unique ID of the
business entity of this price_variant
. This is applicable only when multiple business entities have been created for the site. The value of this attribute indicates that the resource is specific to the given business entity.
boolean Indicates whether the price variant has been deleted or not.
optional, list of attribute The list of price variant attribute values.
Attributes can be used to store additional information about the price variant. For example, for a price variant called ‘Germany’, the attributes can be ‘Country’:'Germany', ‘City’:'Berlin' and so on.
This endpoint allows the creation of a new price variant that can be attached to item prices.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Sample Response [ JSON ]
Show more...
{
"price_variant": {
"updated_at": 1709200385,
"name": "Germany Berlin",
"created_at": 1709200385,
"attributes": [
{
"name": "country",
"value": "germany"
},
{..}
],
"id": "germany-berlin",
"external_name": "Germany",
"resource_version": 1709200385728,
"status": "active",
"object": "price_variant"
}
}
URL Format
POST
https://{site}.chargebee.com/api/v2/price_variants
required, string, max chars=100 The unique and immutable identifier of the price variant.
required, string, max chars=100 A unique name of the price variant.
optional, string, max chars=100 A unique display name for the price variant.
optional, string, max chars=500 Description of the price variant.
optional, string, max chars=100 The variant_group
organizes similar price_variants
to optimize strategies such as bundling, geo-based pricing experiments, and campaign-specific pricing like cb-atomic-pricing-
for effective grouping. The variant_group
provides greater flexibility and precision in your pricing models.
optional, string, max chars=50 The unique ID of the business entity for this price_variant
. 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. .
optional, array Parameters for attributes. Multiple attributes can be passed by specifying unique indices.
Parameters for attributes. Multiple attributes can be passed by specifying unique indices.
pass parameters as attributes[<param name>][<idx:0..n>]
required, string, max chars=100 required, string, max chars=100
always returned required
Resource object representing price_variant
Sample admin console URL
https://{site}.chargebee.com/admin-console/price_variants/123x
This endpoint retrieves the details of a specific price variant using its unique identifier.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Sample Response [ JSON ]
Show more...
{
"price_variant": {
"updated_at": 1709200385,
"name": "Germany Berlin",
"created_at": 1709200385,
"attributes": [
{
"name": "country",
"value": "germany"
},
{..}
],
"id": "germany-berlin",
"external_name": "Germany",
"resource_version": 1709200385728,
"status": "active",
"object": "price_variant"
}
}
URL Format
GET
https://{site}.chargebee.com/api/v2/price_variants/{price-variant-id}
always returned required
Resource object representing price_variant
Sample admin console URL
https://{site}.chargebee.com/admin-console/price_variants/123x
This endpoint modifies the details of an existing price variant.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Sample Response [ JSON ]
Show more...
{
"price_variant": {
"updated_at": 1709200387,
"name": "Germany Munich - Web Sales",
"created_at": 1709200386,
"attributes": [
{
"name": "country",
"value": "germany"
},
{..}
],
"id": "germany-munich",
"external_name": "Germany",
"resource_version": 1709200387080,
"status": "active",
"object": "price_variant"
}
}
URL Format
POST
https://{site}.chargebee.com/api/v2/price_variants/{price-variant-id}
optional, string, max chars=100 A unique name of the price variant.
optional, string, max chars=100 A unique display name for the price variant.
optional, string, max chars=500 Description of the price variant.
optional, string, max chars=100 The variant_group
organizes similar price_variants
to optimize strategies such as bundling, geo-based pricing experiments, and campaign-specific pricing like cb-atomic-pricing-
for effective grouping. The variant_group
provides greater flexibility and precision in your pricing models.
optional, enumerated string Status of a price variant. Possible values are
activeActive price variant. This price variant can be attached to item prices.archivedArchived price variant. This price variant is no longer active
and cannot be attached to new item prices. Existing item prices that already have this price variant attached will continue to remain as is. Show all values[+]
optional, array Parameters for attributes. Multiple attributes can be passed by specifying unique indices.
Parameters for attributes. Multiple attributes can be passed by specifying unique indices.
pass parameters as attributes[<param name>][<idx:0..n>]
required, string, max chars=100 required, string, max chars=100
always returned required
Resource object representing price_variant
Sample admin console URL
https://{site}.chargebee.com/admin-console/price_variants/123x
Deletes the price variant. This is not allowed if price variant is attached to any item price. Once deleted, the id
and name
of the price variant can be reused.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Sample Response [ JSON ]
Show more...
{
"price_variant": {
"updated_at": 1709200386,
"name": "delete sample",
"created_at": 1709200386,
"attributes": [
{
"name": "country",
"value": "germany"
},
{..}
],
"id": "delete-sample",
"external_name": "delete sample",
"resource_version": 1709200386268,
"status": "deleted",
"object": "price_variant"
}
}
URL Format
POST
https://{site}.chargebee.com/api/v2/price_variants/{price-variant-id}/delete
always returned required
Resource object representing price_variant
Sample admin console URL
https://{site}.chargebee.com/admin-console/price_variants/123x
This endpoint is used to retrieve a list of price variants.
This API is not enabled for live sites by default. Please contact
support to get this enabled.
Sample Response [ JSON ]
Show more...
{
"list": [
{
"price_variant": {
"updated_at": 1709200385,
"name": "Germany Berlin",
"created_at": 1709200385,
"attributes": [
{
"name": "country",
"value": "germany"
},
{..}
],
"id": "germany-berlin",
"external_name": "Germany",
"resource_version": 1709200385728,
"status": "active",
"object": "price_variant"
}
},
{..}
]
}
URL Format
GET
https://{site}.chargebee.com/api/v2/price_variants
optional, integer, default=10, min=1, max=100 The number of resources to be returned.
optional, string, max chars=1000 Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set offset
to the value of next_offset
obtained in the previous iteration of the API call.
optional, string filter
Sorts based on the specified attribute.
Supported attributes : name, id, status, created_at, updated_at
Supported sort-orders : asc, desc
Example → sort_by[asc] = "name"
This will sort the result based on the 'name'
attribute in ascending(earliest first) order.
optional, string filter Filter variant based on their id. Possible values are : Supported operators : is, is_not, starts_with, in, not_in
Example → id[is] = "basic" Filter variant based on their id. pass parameters as id[<param name>][<operator>] optional, string, min chars=1 filter
Possible values are :
Supported operators :
Example →
optional, string, min chars=1 filter
Possible values are :
Supported operators :
Example →
id[starts_with][operator] id[starts_with][operator] optional, string, min chars=1 filter
Possible values are :
Supported operators :
Example →
optional, string filter
Possible values are :
Supported operators :
Example →
optional, string filter
Possible values are :
Supported operators :
Example →
optional, string filter
Filter variant based on their name
s. Possible values are :
Supported operators : is, is_not, starts_with, in, not_in
Example → name[is] = "basic"
Filter variant based on their name
s.
pass parameters as name[<param name>][<operator>]
optional, string, min chars=1 filter
Possible values are :
Supported operators :
Example →
optional, string, min chars=1 filter
Possible values are :
Supported operators :
Example →
name[starts_with][operator] name[starts_with][operator] optional, string, min chars=1 filter
Possible values are :
Supported operators :
Example →
optional, string filter
Possible values are :
Supported operators :
Example →
optional, string filter
Possible values are :
Supported operators :
Example →
optional, enumerated string filter
Filter variant based on their status
. Possible values are : active, archived
Supported operators : is, is_not, in, not_in
Example → status[is] = "active"
Filter variant based on their status
.
pass parameters as status[<param name>][<operator>]
optional, enumerated string filter
Possible values are : active, archived
Supported operators :
Example →
optional, enumerated string filter
Possible values are : active, archived
Supported operators :
Example →
optional, string filter
Possible values are :
Supported operators :
Example →
optional, string filter
Possible values are :
Supported operators :
Example →
optional, timestamp(UTC) in seconds filter
Filter product based on their updated time
. Possible values are :
Supported operators : after, before, on, between
Example → updated_at[after] = "1243545465"
Filter product based on their updated time
.
pass parameters as updated_at[<param name>][<operator>]
updated_at[after][operator] updated_at[after][operator] optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :
Example →
updated_at[before][operator] updated_at[before][operator] optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :
Example →
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :
Example →
updated_at[between][operator] updated_at[between][operator] optional, string filter
Possible values are :
Supported operators :
Example →
optional, timestamp(UTC) in seconds filter
Filter product based on their created time
. Possible values are :
Supported operators : after, before, on, between
Example → created_at[after] = "1243545465"
Filter product based on their created time
.
pass parameters as created_at[<param name>][<operator>]
created_at[after][operator] created_at[after][operator] optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :
Example →
created_at[before][operator] created_at[before][operator] optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :
Example →
optional, timestamp(UTC) in seconds filter
Possible values are :
Supported operators :
Example →
created_at[between][operator] created_at[between][operator] optional, string filter
Possible values are :
Supported operators :
Example →
business_entity_id[<operator>] business_entity_id[<operator>] optional, enumerated string filter The unique ID of the
business entity of this price_variant
. Learn more about all the scenarios before using this filter.
Possible values are : true, false Supported operators : is_present, is
Example → business_entity_id[is_present] = "business_entity_id" The unique ID of the
business entity of this price_variant
. Learn more about all the scenarios before using this filter.
pass parameters as business_entity_id[<param name>][<operator>] business_entity_id[is_present][operator] business_entity_id[is_present][operator] optional, enumerated string filter
Possible values are : true, false
Supported operators :
Example →
business_entity_id[is][operator] business_entity_id[is][operator] optional, string, min chars=1 filter
Possible values are :
Supported operators :
Example →
include_site_level_resources[<operator>] include_site_level_resources[<operator>] optional, enumerated string filter Default value is true
. To exclude site-level resources in specific cases, set this parameter to false
.
Possible values are : true, false Supported operators : is
Example → include_site_level_resources[is] = "null" +
include_site_level_resources
Default value is true
. To exclude site-level resources in specific cases, set this parameter to false
.
pass parameters as include_site_level_resources[<param name>][<operator>] include_site_level_resources[is][operator] include_site_level_resources[is][operator] optional, enumerated string filter
Possible values are : true, false
Supported operators :
Example →
always returned required
Resource object representing price_variant
always returned optional, string, max chars=1000
This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter `offset`.
Sample admin console URL
https://{site}.chargebee.com/admin-console/price_variants/123x