This API creates an item price (a price point) for an item.
Prerequisites & Constraints
- Either
priceorprice_in_decimalis required whenpricing_modelisflat_feeorper_unit. tiersis applicable only whenpricing_modelistiered,volume, orstairstep.
Sample Request
Sample Result[JSON]
URL Format
Input Parameters
A unique display name for the item price in the Chargebee UI. If external_name
is not provided, this is also used in customer-facing pages and documents such as invoices
and hosted pages
.
namemust be unique across all item prices.
Description of the item price.
descriptionmust not exceed 500 characters excluding HTML tags. The total length, including HTML tags, must not exceed 2000 characters.
Note: inputs that require sanitization, such as incomplete HTML tags, may be altered and grow in length, and the request is rejected if the sanitized content exceeds these limits.
A customer-facing note added to all invoices associated with this API resource. This note becomes one among all the notes displayed on the invoice PDF.
Specifies how to manage charges or credits for the addon item price during a subscription update or estimating a subscription update.
- Item-level Proration must be enabled for your site to provide
proration_type.
proration_typeis applicable only whenpricing_modelisper_unit.proration_typeis applicable only when the associateditem_typeisaddon.
Use the site-wide proration setting .
Prorate the charges or credits for the rest of the current term.
Charge the full price of the addon item price or give the full credit. Don't apply any proration.
The name of the item price used in customer-facing pages and documents. These include invoices
and hosted pages.
If not provided, then name
is used.
The currency code (ISO 4217 format ) for the item price. Is required when multiple currencies have been enabled.
currency_codemust be one of the currencies configured for your site.currency_codeis required when multiple currencies are enabled for your site.
An immutable unique identifier of a price variant.
- Variant Pricing (or migration mode) must be enabled for your site to provide
price_variant_id.
Specifies whether taxes apply to this item price. This value is set and returned even if Taxes have been disabled in Chargebee. However, the value is effective only while Taxes are enabled.
Free quantity the subscriptions of this plan item_price will have. Only the quantity exceeding this value will be charged in the subscription.
Note:
free_quantityis currently supported only for planitem_price.free_quantityis not supported for the Usage-Based Billing (UBB). All included or free quantities should be configured exclusively through entitlements .
free_quantityis applicable only when the associateditem_typeisplan.free_quantityis not applicable whenpricing_modelisflat_fee.
The quantity of the item that is available free-of-charge, represented in decimal. When a subscription is created for this plan or when the plan of a subscription is changed to this one, only the quantity above this number is charged for. Applicable for quantity-based plans and only when multi-decimal pricing is enabled.
free_quantity_in_decimalis not applicable whenpricing_modelisflat_fee.- Multi-decimal Pricing must be enabled for your site to provide
free_quantity_in_decimal.
A collection of key-value pairs that provides extra information about the item price.
Note: There's a character limit of 65,535.
Whether the item price's description should be shown on invoice PDFs. If this Boolean is changed, only invoices generated (or regenerated ) after the change are affected; past invoices are not.
Whether the item price's description should be shown on quote PDFs. If this Boolean is changed, only quotes created after the change are affected; past quotes are not.
Specifies the frequency at which the usage counter needs to be reset.
Note:
Changes to the usage_accumulation_reset_frequency
parameter for item_price
is not allowed if the item
is already linked to a subscription.
.
usage_accumulation_reset_frequencyis applicable only when the associated item is metered.usage_accumulation_reset_frequencyis applicable only whenpricing_modelistiered.
Accumulates usage without ever resetting it.
Accumulates usage until the subscription's billing frequency ends.
The unique ID of the business entity
for this item_price.
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.
- Multiple Business Entities must be enabled for your site to provide
business_entity_id.
The pricing scheme for this item price. If subscriptions, invoices or differential prices exist for this item price, pricing_model cannot be changed.
A fixed price that is not quantity-based.
A fixed price per unit quantity.
There are quantity tiers for which per unit prices are set. Quantities are purchased from successive tiers.
The per unit price is based on the tier that the total quantity falls in.
A quantity-based pricing scheme. The item is charged a fixed price based on the tier that the total quantity falls in.
The cost of the item price when the pricing model is flat_fee.
When the pricing model is per_unit
, it is the price per unit quantity of the item. Not applicable for the other pricing models. The value is in the minor unit of the currency
.
priceis applicable only whenpricing_modelisflat_feeorper_unit.pricemust not exceed the maximum allowed value configured for your site.
The price of the item when the pricing_model is flat_fee.
When the pricing model is per_unit
, it is the price per unit quantity of the item. Not applicable for the other pricing models. The value is in decimal and in major units of the currency. Also, this is only applicable when multi-decimal pricing
is enabled.
price_in_decimalis applicable only whenpricing_modelisflat_feeorper_unit.- Multi-decimal Pricing must be enabled for your site to provide
price_in_decimal.
The unit of time for period.
If subscriptions or invoices exist for this item price, period_unit
cannot be changed. The period_unit
is mandatory when the item type
is plan
or addon
.
Important:
The period + period_unit pair must match a configured billing frequency on your site. The API does not create new frequencies. To use a new frequency (for example, 3 months or 2 weeks), add it in the site settings first. Requests with non-configured combinations fail validation.
- Monthly:
period=1,period_unit=month(available by default) - Quarterly:
period=3,period_unit=month(enable 3-month frequency in settings) - Weekly:
period=1,period_unit=week(available by default) See how billing periods apply .
period_unitis required when the associated item'stypeisplanoraddon.
period_unitmust not be provided when the associated item'stypeischarge.
A period of 24 hours.
A period of 7 days.
A period of 1 calendar month.
A period of 1 calendar year.
- When the item
typeisplan: The billing period of the plan inperiod_units. For example, create a 6 month plan by providingperiodas 6 andperiod_unitas month. - When item
typeisaddon: The period of the addon inperiod_units. For example, create an addon with a 2 monthperiodby providing period as 2 andperiod_unitasmonth. The period of an addon is the duration for which itspriceapplies. When attached to a plan, the addon is billed for the billing period of the plan. Learn more.
If subscriptions or invoices exist for this item price, period
cannot be changed. The period
is mandatory when the item type
is plan
or addon.
Important:
The period value, together with period_unit, must equal one of your site's configured billing frequencies. If the combination does not exist, the request fails with an invalid billing period configuration error. Configure the frequency in site settings and retry. See Addons and billing cycle.
periodis required when the associated item'stypeisplanoraddon.
periodmust not be provided when the associated item'stypeischarge.
The unit of time for trial_period
.
trial_periodis required whentrial_period_unitis provided.trial_period_unitmust not be provided when the associated item'stypeischarge.
A period of 24 hours.
A period of 1 calendar month.
The trial period of the plan in trial_period_unit
s. You can also set trial periods for addons
; contact Support
to enable that feature.
trial_period_unitis required whentrial_periodis provided.trial_periodmust not be provided when the associated item'stypeischarge.
Defines the shipping frequency in association with shipping period.
shipping_periodis required whenshipping_period_unitis provided.shipping_period_unitmust not be provided when the associated item'stypeischarge.
A period of 24 hours.
A period of 7 days.
A period of 1 calendar month.
A period of 1 calendar year.
The default number of billing cycles a subscription to the plan must run. Can be overridden for a subscription.
Addons can also have billing cycles. Also, for addons, you can override this while attaching it to a plan. However, if you provide the value while applying the addon to a subscription, then that value takes still higher precedence.
If subscriptions, invoices or differential prices
exist for this item price, billing_cycles
cannot be changed.
Note:
If you want to change the billing_cycles
to unlimited renewals, enter an empty string. This value can only be updated if the item_price
is not attached to a subscription or invoice. If no billing_cycles
value is entered, then by default the value will be set as unlimited billing_cycles
renewals.
billing_cyclesmust not be provided when the associated item'stypeischarge.
Applicable only when End-of-trial Action
has been enabled for the site. Specifies the operation to be carried out for the subscription once the trial ends. Whenever the item.type
is plan
and a trial period is defined for this item price, this attribute (parameter) is returned (required). This can be overridden at the subscription-level
.
trial_end_actionmust not be provided when the associated item'stypeischarge.trial_end_actionis applicable only when the associateditem_typeisplan.
The action configured for the site at the time when the trial ends, takes effect.
The subscription activates and charges are raised for non-metered items.
The subscription cancels.