Membership subscription manager

If you are charging your affiliates with a fee for joining your affiliate program (to be able to promote you and get commissions) and you need an option that automatically disallows affiliates from logging into their accounts if they did not pay a fee, you can use this feature. 

The membership subscription manager feature is a tool for processing membership payments of your affiliates. Statuses of affiliates with expired subscriptions are automatically set as pending or declined, so they won't be able to log into their affiliate panels (because they didn't pay your fee).
The feature also contains an option to send email notifications to both merchants and affiliates.

you need to track sales with specific data, base on which the feature works. So, you need to make sure that:
- you track product ID within a sale/payment.
- you track customer email within a sale/payment.

Activate the feature
To use the feature, you have to activate it first. In the merchant panel navigate to Configuration > Features > search for "Membership subscription manager" > click on the 'Activate' button next to the feature. 

Configure the feature
Once you activate the feature, there is a new configuration section added to the Configuration > Membership subscription.

Transaction data field for customer email - choose a sale data field into which you are tracking customer emails from an order/sale. 

Products - here you can add product IDs for which subscriptions will be checked. Just write product ID (one at the time) into the field, choose a time period and click on the 'add' button. As you can see on the above screenshot, you can add multiple product IDs with different time periods.

Active subscription - set if you would like to approve only pending affiliates, or also affiliates in the declined state. 

Expired subscription - choose if affiliates should be set as pending or declined when they don't pay a fee. 

New affiliate - if you enable this option, a new affiliate will be created based on the purchased product specified in this feature if such an affiliate doesn't exist already. 

Notifications - you can choose what email notifications will be sent to the merchant and affiliates. You can customize these emails via email templates.

Affiliate data field for subscribed product ID - choose the affiliate field under which product ID of the subscription will be saved. 


Affiliate subscription info
In affiliate details, you can see the 'Subscription expire' field. In this field, there is either:
- "Don't require subscription" option set, so affiliate status won't be changed based on any product. 
- or, there is a specific date and time set, on which affiliate status will be changed to pending or declined if there won't be a subscription payment made. 

Subscription refunds
Refunds are processed by feature as well, in this way:
- let's say an affiliate buys a subscription which is set as a monthly fee. The date in 'Subscription expire' affiliate field will be set from the day of the purchase + 1 month. When there will be a refund of the affiliate's purchase, the date in 'Subscription expire' affiliate field will be set back for 1 month.


Subscription check - there is a task running on the background once per day. 
It is checking if there is a new commission with the product ID specified in the plugin created. If there isn't a new commission for the affiliate in the needed time period, the affiliate will be set as pending or declined.