It is very simple!!! You just create a new Subscription and define the follow basic elements:
- user groups when subscription is active,
- user groups when subscription terminates.
Then you add the Subscription buy button in an article. When someone purchase, then he is automatically login to your site with the user group you defined. The user is based on the email used in PayPal, therefore if he is already a registered user, his account is moved to the defined user group, if not then an account is automatically created.
When the subscription duration finish, when user tries to login to your site, automatically his user group will go back to user group you define when the subscription is inactive.