Introducing the Chargebee CLI

Error: item_prices[quantity][0] : This param should not be sent for on_off addon type

This article covers

What is the reason behind this "error: item_prices[quantity][0]: This param should not be sent for on_off addon type" via APIs?

Solution

This error usually occurs when the quantity field is being passed for flat fee non-recurring addon. The quantity field should not be passed, just passing the add-on ID alone will add the new addon to the subscription. If it is a unit-based addon such as a per-unit, tiered, volume, or stair-step addon, then the quantity field should be passed to specify the exact number of units.