def create(self, validated_data):  # type: ignore[no-untyped-def]
        """
        Get the subscription data from Chargebee hosted page and store in the subscription
        """
        organisation = self._get_organisation()  # type: ignore[no-untyped-call]

        if settings.ENABLE_CHARGEBEE:
            subscription_data = get_subscription_data_from_hosted_page(  # type: ignore[no-untyped-call]
                hosted_page_id=validated_data["hosted_page_id"]
            )

            if subscription_data:
                Subscription.objects.update_or_create(
                    organisation=organisation, defaults=subscription_data
                )
            else:
                raise serializers.ValidationError(
                    {
                        "detail": "Couldn't get subscription information from hosted page."
                    }
                )
        else:
            logger.warning("Chargebee not configured. Not verifying hosted page.")

        return organisation

        Get the subscription data from Chargebee hosted page and store in the subscription
        
api/organisations/serializers.py