This document outlines how to implement user limits for a paid app with multiple tiers (e.g. free and paid). If you have a simple paid app with no tiers, you can jump straight to the Simple Paid App example.
With the simple paid app example under your belt, we can move to a more complex scenario. In this example, the Acme app comes in three different versions:
In your app development tree, four different apps are going to be created - one for each of the above versions along with an app to hold some common libraries and assets.
Each of the Acme apps will need to implement a Subscription Class, so a generic Acme_Subscription_Engine library is used as a base class. It's nearly identical to the simple paid app example.
Each of the Acme tiers then extend the engine library (full code here), so the pertinent part of the Acme_Home_Subscription.php class looks like:
public function __construct() { clearos_profile(__METHOD__, __LINE__); parent::__construct(lang('acme_home_app_name')); }
You can certainly shuffle things around or override the get_info() method… that is up to you.