This article covers
Actions performed using custom codes
Restrict specific addons on selected plans based on the business use case
Solution
Custom Code is an additional feature that Chargebee provides to perform specific actions which are restricted via the API such as performing the subscription change either immediately or at the end of the term using the fetchChangeSubscriptionOptions.
Or actions related to the addons that can be performed using the fetchAllowedPlanConfig that would allow you to:
Specify allowed addons
Specify allowed addons for a particular plan
Specify add-ons to be automatically attached to a plan when selected
Specify quantity meta for a plan/addon
Note: It would not be feasible to restrict the downgrade of addon or remove the “-” button on the portal for changing quantity.
Related articles and Documentation
Specify quantity restriction using metadata
How to hide/plan or addon in Chargebee’s portal