Our standard policy regarding Intellectual Property (IP) is that all IP developed during the course of a project is owned by you, our client. This should give you significant peace of mind in that you’re entitled to take the source code for your site to other hosting or another vendor if you so choose. Furthermore, you’ll never have to pay licencing costs because you have rights to your own source code.
As an Open Source platform, Drupal uses one of the most common Open Source licenses, known as the GNU General Public Licence (GPL).
If you build a website, app or service using Drupal, and then create any additional functionality by writing code, you are the copyright owner of that code. You do not need to worry about licensing at all - unless you want to sell or give that code to others.
At that point your code needs to be provided under the terms of the GPL license, which gives others the freedom to view, extend and distribute the code.
So you have the right to sell your code, for as much as you would like, however you cannot change the terms of the GPL license when you do so.