Content Partner Integration / VAS

This document is a guide to tracking VAS activations using the Affle platform. The Mobile Operators, Content Providers & partners can integrate their CMS (Content Management Systems) with our platform through a simple HTTP API, and perform VAS activation tracking across multiple publishers, ad-networks etc.

VAS activation process flow

1 The Affle platform provides a click tracking URL to the publishers, ad-Network.

2 The click received is logged on the platform and the request for content/activation is forwarded on the Operator/CP CMS URL. This URL has to be provided by the respective partner and is integrated on the platform.
The Affle platform passes to the CP, a CALLBACK URL as query string parameter in the CP provided URL.


• Sample CP URL


• Sample CP URL with the affle Callback link

– http%3A%2F%2F184.173.96.205%2Fmaven%2Fsites%2Fcampaign%2Factivation.php%3Ftid%3D%20b409e44f215ed3e1e61021e9c9b8281f%26msisdn%3D98xxxxxx76%26aty pe%3D%26ctype%3D%26cpp%3D%26arpu%3D

3 The CP processes the forwarded request for content download, subscription/VAS Pack activation etc. The CP shall also perform billing with the operator, service provider billing systems

4 Post billing, the CP is required to invoke the Affle platform provided CALLBACK URL. This is the VAS Activation Tracker URL.

The CP has to populate the query string values in this VAS Activation tracker URL and send it back to the Affle platform.

VAS activation tracker HTTP API

Sample callback/tracker URL

Example 1:

Example 2:

Query string key value parameters

# Params Description  Values  Sample Values
1 tid Transaction ID This is pre-filled in the callback/activation URL
2 msisdn 10 digit mobile number of the subscriber / user 10 digit mobile number 98xxxxxx76
3 atype Activation type DWL Content download type
SUB Subscription type
4 cpp Content price point in Rs. 1,5,7,15,20,30,49, 99, 150, etc.
5 arpu Actual billing value in Rs.
6 ctype Content type DWL values
WP – Wallpaper  WP
AN – Animation AN
RT – Ringtone RT
VD – Video VD
APP – Application APP
MP3 – Music MP3
Subscription Values
<SUB><DWL Values><cpp> SUBRT30

Please note: The Callback/Activation Tracker URL shall be provided to you by our account Manager.

Sample PHP code

The sample code that has to be deployed on the content page has been described below. This sample describes the basic process using a PHP programming language script. The same has been adapted by the content provider to other languages or scripts.

Sample callback URL

/**************** TO BE POPULATED BY CONTENT PROVIDER **************** /
$msisdn=”9810982576″;   //Set the 10 Digit Mobile Number of the User
$atype=”DWL”; //Set the activation type as Download or Subscription
$ctype=”WP”; //Set the content type
$cpp=10; //Set the Content Price Point
$arpu=10; //Set the ARPU (Average Revenue for User)
/**************** TO BE POPULATED BY CONTENT PROVIDER **************** /

//Decode & extract Query String Value for parameter ‘ad2callback’ from Content URL from Content Provider.
$ad2callback = urldecode($_REQUEST[‘ad2callback’]);
echo “<pre>ad2callback = “;print_r($ad2callback);echo “<br><br>”;

//Explode & get the Query String Values from callback url provided in parameter the ‘ad2callback’.
$queryString = explode(“?”,$ad2callback);
echo “<pre>queryString = “;print_r($queryString);echo “<br><br>”;

//Explode on “&”the Query String delimiter and get all the variables.
$params = explode(“&”, $queryString[1]);
echo “<pre>params = “;print_r($params);echo “<br><br>”;

//The first parameter is Transaction ID ‘tid’
$tid = explode(“=”,$params[0]);
echo “<pre>tid = “;print_r($tid);echo “<br><br>”;

//Remainder dta which would be submitted by the content provider [C.P]

//Create the Arguments in the Array to be sent back to affle via POST REQUEST

$postData = array(
“tid”=>$tid[1], //Transaction Id Value from the above extraction

$postUrl = $queryString[0];
//echo $postUrl.”<br><br>”;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $postUrl);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec ($ch);
curl_close ($ch);