Site Map
Tools
Authorizations:
›› remove

 

receiver Attribute

To determine who receives the money from your paid-links, all you need to do is to include the receiver's email in the receiver attribute in the paid-links of your website.

If necessary, you can include up to 5 different receivers. To do this, include the emails of each one in the receiver attribute and define the percentage of the payment that each one should receive.

You will determine the receivers depending on your business model. These can be: your website that hosts the content, the producer of the content, the content copyright owners, the providers involved in processing or providing the services, etc. Each receiver will be paid separately and there is no need for you to be involved with any of these payment transactions.

 

In the following example, the payment will be made to the email david@example.com.

<a href="photo.gif"
 receiver="david@example.com"
 price="US$ 0.50">paid-link</a>

Specifying more than 1 receiver

You may specify up to a maximum of 5 receivers in the receiver attribute.

Insert the percentage of each receiver, followed by a comma and the email. Separate each receiver using a semi-colon. The syntax is as follows:

receiver="percentage,email;percentage,email; ... "

 

In the following example, 30% of the amount will be paid via PayPal to david@example.com. The remaining 70% will be paid via PayPal to alice@test.com:

<a href="photo.gif"
 receiver="30,david@example.com;70,alice@test.com"
 price="US$ 0.50">paid-link</a>

If the total sum of the percentages is not equal to 100%, iCents.net will calculate new proportional percentages, in such a way that the sum results in 100%. For example, if two receivers receive 20% and 30%, then iCents.net will recalculate these percentages as being 40% and 60%, for the total amount to reach 100%.

Note: paid amounts calculated after the percentages have been applied will be rounded down by iCents.net to a reasonable tenths decimal number; therefore, the total amount paid could have a very slight loss with respect to the nominal amount.

Hiding the receiver's email from spammers

The receiver's email can be hidden from (most) spammers, by using a simple transformation. Replace the @ with a $, and replace the . with a #.

For example, david@example.com becomes david$example#com, and the two receiver attributes shown below are the same:

receiver="david@example.com"


receiver="david$example#com"

Hiding the receiver's email from everyone

For privacy purposes, the receiver's email can be hidden in the HTML code of the paid-link, using an encryption procedure known as a hash.

Instead of entering the receiver's email, you can enter its hash, which is an illegible sequence of 27 letters, numbers and symbols.

For example, the two receiver attributes below are the same:

receiver="30,david@example.com;
          70,alice@test.com"


receiver="30,CvIW5mqHC56bXGrh3HpUIh8AGSk;
          70,WktnruHjvvkWCejLXRHvSMNJiEQ"

 

Type in an email below to calculate its hash:

Type the email address:

Hash SHA-1 base64 of the above email:

More details on the hash used by iCents.net

A hash is a one-way encryption procedure. This means that, once a hash has been defined, it is virtually impossible to calculate the text that originated it.

In the receiver attribute you should use hash SHA-1 base64, modified by the conversion table given by:

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789*-

Note that this table is a little different from the default base64 table, which normally defines the last two characters as being +/, and not *-.

Besides, you must guarantee that the entire email address is written in lower case, and that there are no spaces before, after or in the middle of it.

Note: the hash does not use a secret key in its calculation, and therefore a given email will always result in the same hash. For this reason, although it's not possible to calculate the email that originated the hash, it may be possible for sophisticated attackers to guess email addresses by testing which one of them results in the hash.

JavaScript code to calculate the hash of the receiver's email

 

If you need the JavaScript code to calculate the SHA-1 base64 hash in real time for any email address and include in the receiver attribute, iCents.net can provide you the iCentsSha1.js file to do this. Right click this link and select Save Link As....

To use this routine, use the iCentsHashEmail(email) function. For example:

<html>

<script src="iCentsSha1.js" type="text/javascript"></script>

<script>
iCentsHashEmail("david@example.com")
</script>

</html>

Client-side receivers

Normally, the receivers indicated in the receiver attribute are protected and cannot be changed by the user's browser. In other words, the access control features of iCents.net prevents the user to change the receivers indicated in the link.

However, we can define that a receiver should not be protected, so that it can be changed at any time, even by a JavaScript code running on the user's browser page.

In the following example, we have only 70% of the payment defined for the receivers. If this link were used as is, iCents.net would adjust the proportions to sum up 100% (85.7% for the first receiver and 14.3% for the other).

<a href="movie.mpg" price="US$1"
  receiver="60,joe@example.com;
            10,jane@example.com"
            >paid-link</a>

 

However, we could instead include one or more client-side receivers to receive the remaining 30%. To do so, simply include a ? before each client-side receiver:

<a href="movie.mpg" price="US$1"
 receiver="60,joe@example.com;
        10,jane@example.com;
        ?50,david@example.com;
        ?30,alice@example.com;
        ?20,bob@example.com";
        >paid-link</a>

In the example above, iCents.net first calculates what percentage remains from the amounts due to the regular receivers. Then it divides the remaining 30% between David (50%), Alice (30%) and for Bob (20%).

Note that, after payment, the website's web server will receive the information about the receiver who actually received the payment; this is helpful if some other form of control becomes necessary later.

Interaction with Other Paid-Link Attributes

Interaction of the receiver and hostsite Attributes

If the paid-link has a hostsite attribute, the percentage owed to the host site will be discounted first. The remaining amount will be split among the receivers defined in the receiver attribute.