If you’re looking to sell and license your own WordPress themes and plugins, this tutorial series from Tuts+ Code will show you how build a license and update manager plugin:

In this first tutorial in the series, we will start by creating a WordPress plugin to turn your website into a license management server. In part two, we will continue building the plugin by adding an API to it. In part three, we will use the API to make a WordPress plugin or theme talk back to the license manager for updates. ~ Tuts+ Code Tutorial