Home PHP JavaScript CSS WordPress APIs .htaccess Other How-To Useful Scripts What I Recommend
Posted on by Aleksandar Gichevski ()
Like it? Share:

Warning: Missing argument 1 for BaseDD::BaseDD(), called in /home/agicheco/public_html/wp-content/plugins/digg-digg/include/dd-manual.php on line 123 and defined in /home/agicheco/public_html/wp-content/plugins/digg-digg/include/dd-class.php on line 97

Warning: Missing argument 2 for BaseDD::BaseDD(), called in /home/agicheco/public_html/wp-content/plugins/digg-digg/include/dd-manual.php on line 123 and defined in /home/agicheco/public_html/wp-content/plugins/digg-digg/include/dd-class.php on line 97

Warning: Missing argument 3 for BaseDD::BaseDD(), called in /home/agicheco/public_html/wp-content/plugins/digg-digg/include/dd-manual.php on line 123 and defined in /home/agicheco/public_html/wp-content/plugins/digg-digg/include/dd-class.php on line 97

Warning: Missing argument 4 for BaseDD::BaseDD(), called in /home/agicheco/public_html/wp-content/plugins/digg-digg/include/dd-manual.php on line 123 and defined in /home/agicheco/public_html/wp-content/plugins/digg-digg/include/dd-class.php on line 97

JVZoo is a great affiliate platform where vendors can sell products while internet marketers can promote that products and earn affiliate commission.

It is similar to ClickBank but with more features that make the process of selling products lot easier.

Because the popularity of JVZoo in last years I will show you below how to use JVZoo IPN to process the payments and store transaction information to an application.

Get JVZoo Secret Key

Every JVZoo IPN action is connected with your Account Secret Key, so here are the steps how to get it.

Step.1 Create JVzoo.com Account
Step.2 After creating account please login and visit below page:

You should see your Account Information. Search for Click here to edit JVZIPN Secret Key link as shown on below image:


Step.3 Click on that link, Enter your Secret Key and click Save.

That’s it your JVZoo IPN secret key has been successfully saved.

Process JVZoo Payment with IPN

Here is simple script for processing JVZoo Payment:

	die('unathorized access.');

function jvzipnVerification() {
    $secretKey = "<YOUR_SECRET_KEY>";
    $pop = "";
    $ipnFields = array();
    foreach ($_POST AS $key => $value) {
        if ($key == "cverify") {
        $ipnFields[] = $key;
    foreach ($ipnFields as $field) {
        // if Magic Quotes are enabled $_POST[$field] will need to be
        // un-escaped before being appended to $pop
        $pop = $pop . $_POST[$field] . "|";
    $pop = $pop . $secretKey;
    $calcedVerify = sha1(mb_convert_encoding($pop, "UTF-8"));
    $calcedVerify = strtoupper(substr($calcedVerify,0,8));
    return $calcedVerify == $_POST["cverify"];

if(jvzipnVerification() == 1)
        //register sale
	if($_POST['ctransaction'] == 'SALE')
            //execute code when sale has been made

Let’s analyze what this simple script does…

First we check if there is POST parameter ‘ctransaction’ that is part from JVZoo IPN. If that parameter does not exist then the request is not sent from JVZoo.

If ‘ctransaction’ parameter exists then we verify if the request really came from JVZoo using predefined function for verification.

If verification is passed then we can execute whatever code we want. In our case there is IF clause that checks if the transaction was SALE then it executes code.

Other types of transaction are:




The purchase of a standard product or the initial purchase of recurring billing product.


A rebill for a recurring billing product.


The refunding of a standard or recurring billing product. Recurring billing products that are refunded also result in a “CANCEL-REBILL” action.


A chargeback for a standard or recurring product.


An eCheck chargeback for a standard or recurring product.


The cancellation of a recurring billing product. Recurring billing products that are canceled do not result in any other action.


Reversing the cancellation of a recurring billing product.

JVZoo IPN Sent Parameters

Here is a list of parameters that are sent from JVZoo IPN after specific transaction has been executed:





customer name

1-510 Characters


customer state

0-2 Characters


customer country code

0-2 Characters


customer email

1-255 Characters


JVZoo product number

1-5 Characters


title of product at time of purchase

0-255 Characters


type of product on transaction (STANDARD, and RECURRING)

8-11 Characters


action taken

4-15 Characters


affiliate on transaction

0-10 Characters


amount paid to party receiving notification (in pennies (1000 = $10.00))

3-10 Characters


method of payment by customer

0-4 Characters


vendor on transaction

5-10 Characters


JVZoo Payment Id

16-22 Characters


Parent receipt number for upsell transaction

8-13 Characters


affiliate tracking id

0 – 24 Characters


extra information passed to order form with duplicated information removed

0-1024 Characters


the “cverify” parameter is used to verify the validity of the previous fields

8 Characters


the Epoch time the transaction occurred (not included in cverify)

10 Characters

Enter an Instant Notification URL

After completing your IPN script you need to to one more thing to make it work properly.

Step.1 Click the Sellers tab
Step.2 Click your product in the sub nav
Step.3 Enter an Instant Notification URL in the JVZIPN URL field (ports 80 or 443 – SSL Recommended) and click ‘Save Changes’

Now you are all set and all JVZoo transactions will be processed and sent to your Instant Notification URL.

Other Posts You Might Like

4 responses to “JVZoo IPN API in PHP”

  1. SEB says:

    Could I insert Facebook pixel tracking code when the sale is complete? Facebook generally requires the pixel code be on a thank you page that would display on your website after the sale. However in JVzoo we don’t have control of a thank you page. This would allow us to drive traffic to our affiliate links fron facebook ads with NO risk or upfront expense.

    • agiche says:

      Yes, what you can do is echo the fb_code once the payment is successful so u get only the conversions… for example:

      if($_POST[‘ctransaction’] == ‘SALE’)
      echo ‘FB_CODE’;

      This should execute the code as regular user

      • SEB says:

        Thank you. But I can’t see how I get Instant Notifications in JVzoo as an Affiliate. Is there a way?

        • agiche says:

          Sorry I maybe miss-understood you.. If u are the seller of the product then you can use above code to your website to get IPN from JVzoo and add the code, else if you are just affiliate and you want to promote the product it is not possible because u don’t have access

Leave a Reply

Your email address will not be published. Required fields are marked *

Get a fast, free website audit

Enter your URL below to get full in-depth SEO report and tips.

Useful Scripts

Most Popular Posts

Recent Posts

June 14th, 2014
Website Optimization Using Gzip Compression

June 10th, 2014
Google Search AutoComplete API

May 14th, 2014
What is a Tag Cloud and How to Calculate it by Formula

March 27th, 2014
Error writing file /tmp (errcode 28) Solved!

February 15th, 2014
Fixed CSS & HTML Navigation Bar

February 9th, 2014
Benchmark Your Server (CPU, File IO, MySQL) with SysBench

February 8th, 2014
JavaScript Array Basics

January 29th, 2014

January 25th, 2014
Payoneer Debit Card for Freelancers to receive money online

January 24th, 2014
How HTML Color Codes are generated?

Read Latest Posts directly on Facebook



Get a fast, free website audit

Enter your URL below to get full in-depth SEO report and tips.