Click Detail
GET /transaction/click_detail
Description | URL | Response Format | Request Method | Authentication |
---|---|---|---|---|
Aapprove a pending transaction | https://domain/api/transaction/approve_pending_transaction | JSON | POST | HTTP headers |
Parameters
Paremeters must be sent with the request body. The examples below show the parameters sent as x-www-form-urlencoded. You need to pass either transaction_hash or subscription_id or orderid for customer lookup otherwise the call will fail.
Name | Description | Type | Required |
---|---|---|---|
transaction_hash | click_hash of the click you are looking up, or the transaction_hash of an already converted transaction | string | yes |
Example Request
POST
https://domain/api/transaction/click_detail
Response:
true
Example Code
php
<?php
$curl = curl_init();
$data = array(
'transaction_hash' => '35b71a300115be9.16738986',
);
$url = 'http://domain/api/transaction/click_detail';
$headers = array(
'api-key: 44b5498dbcb481a0d00b404c0169af62',
'api-username: tf_admin'
);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($curl, CURLOPT_URL, $url);
$resp = curl_exec($curl);
//dumps an associative array representation of the json
var_dump(json_decode($resp, true));
// Close request to clear up some resources
curl_close($curl);
?>
python
import requests
import json
url = 'http://domain/api/transaction/click_detail'
payload = {
'transaction_hash': '35b71a300115be9.16738986',
}
headers = {
'api-key': '44b5498dbcb481a0d00b404c0169af62',
'api-username': 'tf_admin'
}
res = requests.GET(url, data=payload, headers=headers)
print res.json()
node.js
This example requires npm and the request module which can be installed via npm by: 'npm install request'
var request = require('request');
data = {
'transaction_hash': '35b71a300115be9.16738986',
}
var options = {
url: 'http://domain/api/transaction/click_detail',
method: 'GET',
form: data,
json: true,
headers: {
'api-key': '44b5498dbcb481a0d00b404c0169af62',
'api-username': 'tf_admin'
}
};
function callback(error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body);
}
else{
console.log(body);
}
}
request(options, callback);
curl