where to call onPlanPurchased( ) method after it is in events.js or does it gets automatically called???

The event handler onPlanPurchased() is not called. As the documentation states that is: " An event that fires when a user purchases a plan. "

=> Note that the wix-paid-plans-backend module has been deprecated and will continue to work. A newer version is available at wix-pricing-plans and wix-pricing-plans-backend .