If plan is not provided the api should return an error