Introducing the Chargebee CLI

Can I customize the Self-Serve Portal product selection UI with portal custom code?

Problem Statement

You use the hosted Chargebee Self-Serve Portal (opened through Chargebee.js as a modal or standalone page) and want customers to change subscriptions through a custom product catalog or shop-style layout instead of the portal's default plan and addon selectors. You want to know whether portal custom code can deliver that experience inside the hosted portal.

  • Can I add new workflows or call my own APIs from Self-Serve Portal custom code?
  • What actions can portal custom code perform?
  • How do I restrict which plans or addons a customer can select when they edit a subscription?

Solution

No. Portal custom code cannot change how the hosted Self-Serve Portal looks or behaves beyond the two supported functions. It runs on Chargebee when a customer uses the Edit Subscription flow; it does not run in the customer's browser and cannot inject HTML, CSS, new screens, or custom navigation.

Use portal custom code only to:

  • Control which plans and addons are offered (fetchAllowedPlanConfig).
  • Control when a subscription change applies—immediately or at end of term (fetchChangeSubscriptionOptions).

For the full capability list, limits, and alternatives, see Portal Custom Code.

To show products in your own layout—for example, letting customers pick alternative products from your existing shop—you build the selection screen in your application, list eligible items with Chargebee APIs, preview impact with estimate APIs, and apply the change through the Subscriptions API or hosted checkout. You can keep the hosted portal for other actions and open specific sections with Chargebee Widgets and portal integration.

You cannot restrict addon downgrade or remove the quantity decrease ("-") button on the portal through fetchAllowedPlanConfig. See Fetch allowed plan configuration.