In Drupal we can create a time based subscription for a user for a given role. The user will be assigned to that role for a certain limit of time, after that the role will expire. The subscription will be based on Ubercart product. When a user purchases the product, account of user is upgraded to a specified role for a given time limit. The user can also renew for the role by purchasing the product after end of subscription.