Introducing the Better Auth Chargebee plugin: Use it to handle subscriptions, billing, and auth seamlessly.
Chargebeechargebee API

Create a price variant

Idempotency Supported

This endpoint allows the creation of a new price variant that can be attached to item prices.

Sample Request

create a price variant

Sample Result[JSON]

URL Format

POST https://[site].chargebee.com/api/v2/price_variants

Input Parameters

id
required, string, max chars=100

The unique and immutable identifier of the price variant.

name
required, string, max chars=100

A unique name of the price variant.

external_name
optional, string, max chars=100

A unique display name for the price variant.

description
optional, string, max chars=500

Description of the price variant.

variant_group
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.

business_entity_id
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.

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

attributes[0..n]
Parameters for attributes. Multiple attributes can be passed by specifying unique indices.
pass parameters as attributes[<param name>][<idx:0..n>]

Returns

Price variant object
Resource object representing price_variant