ClickBank Email Notifications Script for Affiliates

OLD (for the ClickBank Instant Notification service Version 2.1) Download it right now!

NEW! (for Version 6.0) Download it right now!

This ClickBank Email Notifications Script is able to send you email notifications anytime you make a sale as a ClickBank affiliate. Here's an example of such notification:

ClickBank Email Notification

There are many such scripts available online, but as you can see this one presents you complete data in a very compact way.

Requirements

The ClickBank Email Notifications Script will be installed to your hosting account. Your hosting must support PHP 5.2 (or above) with mbstring and mcrypt libraries.

Installation of the ClickBank Email Notifications Script

Step 1. Copy the ClickBank Email Notifications Script to your hosting account and set it up

The downloaded archive contains only one file 'notify.php'. You should create some folder with a non-obvious name in the root of your domain (e.g. 'notify_3285'). Then copy the 'notify.php' to this folder.

Now, you have to edit the 'notify.php' with any simple text editor (like notepad).

There are several definitions that you have to change. At the top of the file, below the copyright notice, find the lines like define('PARAM', 'VALUE'); and change their values.

CB_SECRET_KEYThis must be your ClickBank Secret Key. If you don't have one, just think it up right now. The secret key can be up to 16 letters or digits, and must be in ALL CAPS.
FROM_EMAIL_ADDRESSThis should be a "From:" email address for your email notifications. For example, "noreply@YourDomain.com". This definition can be empty.
TO_EMAIL_ADDRESSThis must be your email address where you want to receive the email notifications.
LOG_HTML_FILEDeprecated. This is a name of an HTML-file where all successful transactions are recorded. (E.g. you will be able to see all your transactions by typing the URL http://www.yourdomain.com/notify_3285/output.html)
LOG_TXT_ERRORSThis is a name of a text-file where all failed requests are recorded (e.g. if they didn't pass the secret key verification).
EXIT_ON_TESTThis can be 0 or 1. In case of 1, you won't receive email notifications for TEST-transactions.

Step 2. Create a ClickBank Secret Key

This Email Notifications Script relies on the ClickBank Instant Notification Service. The latter sends a POST request to the script each time a new transaction related to your ClickBank account occurs. To verify that a request comes from the ClickBank INS, the script checks its signature which is based on your Secret Key.

If you don't have a ClickBank secret key, here is a procedure on how to obtain INS access and create your secret key.

Log into your ClickBank account and access the "Account Settings" -> "My Site" section:

ClickBank Settings: My Site

At the bottom, you can see the empty "Advanced Tools" block. Click on its "Edit" link:

ClickBank Settings: Advanced Tools

In the Advanced Tools Editor, click on the link "request access" link:

ClickBank Settings: Request Access

Answer on each question with "Yes", agree with the Terms of Use and hit the "Save Changes & Request API Access" button:

ClickBank Settings: Request API Access

Now, your account has been enabled for instant notifications:

ClickBank Settings: Site changes requested successfully

Again, click on the "Edit" link of the "Advanced Tools" block:

ClickBank Settings: Advanced Tools

Type here your Secret Key (can be up to 16 letters or digits in ALL CAPS; must be the same as the CB_SECRET_KEY definition in your 'notify.php' file), the URL to your copy of 'notify.php', select the "2.1" "6.0" INS version, click "TEST IPN" to verify the URL and click on the "Save Changes" button.

Please, pay attention that the version must be 2.1 6.0! The ClickBank Email Notifications Script hasn't been tested for other INS versions.

ClickBank Settings: Advanced Tools Editor

And now, your "Advanced Tools" block is filled with your secret key and the URL of the ClickBank Email Notifications Script:

ClickBank Settings: Advanced Tools Set

Step 3. Make sure your email notifications don't go to your spam folder

When you have many sales, the ClickBank Email Notifications Script will send you a lot of messages. And your email service/program may start treating them as spam.

To make sure you receive all email notifications, you should whitelist your FROM_EMAIL_ADDRESS or your domain name. This is being done by applying special filters in your mail settings. Here is a collection of tutorials on how to do this for the most popular email services. Particularly, for Gmail, Yahoo! Mail and Hotmail.

The structure of the email notification's subjects

If you want to create some filters to classify your email notifications, you might want to know the format of their subjects:

  • All email notifications' subjects start with '>>>'.
  • Then goes the transaction type: SALE, SALE-RB, BILL, RFND, RFND-RB, CANCEL-REBILL, TEST or TEST_SALE.
  • After that you can see the vendor's ClickBank ID.
  • The earned/lost amount of money.
  • The Order # and your role in this transaction.

For example:
>>> SALE-RB vendorid +$23.98 #ABCDEFGH AFFILIATE

---

Should you have any questions about our ClickBank Email Notifications Script, you can contact our support.