Hosted CMS framework

Hi there,

I’m building an hosted CMS where users can choose a template and build a website with it. So, they dont’a pay for the template, but for the hosting and maintainance.
Can I buy the all template licence and use it ?