BILLmanager Documentation

Affiliate program

BILLmanager allows to add and manage affiliate programs. An affiliate program will compensate a certain amount of purchase on referred new customers.

An affiliate can bring referrals in two ways:

  • Via an affiliate link.  The billing system generates a unique link for every partner. The system considers that clients who clicked through referral are invited by a particular partner. As a rule, the provider's partners place affiliate links on their websites.
  • Using a promo code. Each partner has a unique promotion code. Affiliates need to enter a promo code when ordering services. Clients who used this promo code are considered to be invited by this particular partner. 

Affiliate program configuration

To add a new affiliate program navigate to BILLmanager "Marketing" → "Affiliate programs" → "Add" :

Provider - a service provider who launches an affiliate program. This field is shown only in BILLmanager Corporate. 

Name  - the name of the affiliate program. 

Promo code template - you can use the macro @ID@ - a unique partner ID. A promo generated without this macro is invalid. A promo code is only valid when used for the first time. If a client has several unpaid services on his account, the promo code won't work.

Reward - percent of a client's expenses that will be added to the affiliate account at the end of the month.

Referral period period in months during which a client will get a percentage from referral expenses. 

Website URL  - the URL of the provider website. Add the '?from=' parameter to the domain site to generate an affiliate link. Using this parameter, BILLmanager defines an affiliate who referred a client. Every affiliate has a unique URL with its id at the end.

Client group  - a group of clients who can participate in the affiliate program.

Forbid for group members  - a group of clients who won't be rewarded for the affiliate program.  

Integration with your website

To keep track of clients who followed the affiliate links and got registered, add the following code into any page of the provider's website: 

<script language="javascript">
  var counter_url = "https://billmgr.domain/mancgi/counter?rnd="+Math.random()+"&project=1&r="+escape(document.referrer)+"&p="+escape(window.location.href);
  document.write("<img src='" + counter_url + "' border=0 width=0 height=0 style='display: none;'>");


billmgr.domain -  a domain name of the provider's billing panel

rnd - this parameter allows to prevent caching. 

project -  the id of the affiliate program provider. For BILLmanager the id is always "1", for BILLmanager Corporate - values different from "1". 

r - the parameter which is used to register a page/domain a referral was referred from.

p - the full URL of the current page to retrieve the id of the affiliate who referred a new client

Assigning a client manually

To associate a referral with the client, navigate to "Clients" → "Clients" → select a client → "Accounts" → select an account → "Edit" → "":

Paying commission to affiliates 

At the 1st of each month, the affiliate gets paid for the payers he sends. The amount is calculated based on the referral expenses for the previous month. The billing system automatically creates a payment for the affiliate. 

The provider can run the operation manually:  

/usr/local/mgr5/sbin/billmaintain --command affiliatemonthly --date 2016-04-01

The billing system generates referral rewards for the current month. if the  '--date 2016-04-01' parameter is specified, the system will generate the payments for April (the fourth month).