Start a new topic

subscriptionChanged, subscriptionCancelled and subscriptionReactivated callbacks on portal.open() ?

 From the docs:


https://www.chargebee.com/checkout-portal-docs/api.html#chargebee-portal-instance-object


Code I Am using: 

      const cbPortal = chargebeeInstance.createChargebeePortal();
        let changed = false;
        cbPortal.open({
          subscriptionChanged: (data) => {
            console.log('change fired', data);
          },
          subscriptionCancelled: (data) => {
            console.log('cancelled fired', data);
          },
          subscriptionReactivated: () => {
            console.log('reactivated fired', data);
          },
          close: () => {
            console.log('close fired');
          },
        });

  I have an active subscription, I open the portal, cancel the subscription. UI says that is canceled, after that I close the portal. The only callback that is invoked is close() neither subscriptionChanged neither subscriptionCancelled is invoked. Am I missing something?

Login or Signup to post a comment