Skip to content

Process Void

POST transaction/process_void

Description URL Response Format Request Method Authentication
Void a transaction that was previously converted https://domain/api/transaction/process_void JSON POST HTTP headers

Parameters

Paremeters can be sent as url encoded params. See examples below.

Name Description Type Required
transaction_hash Click_hash/transaction_hash of the transaction you want voided string no
click_hash Click_hash/transaction_hash of the transaction you want voided string no
orderid Transaction identifier sent on conversion (orderid) you want voided string no
transactionid Trackfinity generated transaction identifier you want voided string no
approved Used in setups with pending conversions so the initial transaction identifier can be sent to void the associated approval string no
trans_custom1 Custom value to record with a transaction. -1 is a reserved value and should not be used string no
trans_custom2 Custom value to record with a transaction. -1 is a reserved value and should not be used string no
trans_custom3 Custom value to record with a transaction. -1 is a reserved value and should not be used string no
trans_custom4 Custom value to record with a transaction. -1 is a reserved value and should not be used string no
trans_custom5 Custom value to record with a transaction. -1 is a reserved value and should not be used string no

Example Request

POST

https://domain.com/api/transaction/process_void

Response:

Success
{
   "result": "success",
   "message": "*success*"
}

Failure
{
   "result": "error",
   "message": "*error* - Void transaction exists."
}

Example Code

php

<?php
$curl = curl_init();

$data = array(
    'type' => 'void',
    'transaction_hash' => '156097c947ece92.38318951',
);
$url = 'http://domain/api/transaction/process_void';
$headers = array(
    'api-key: 44b5498dbcb481a0d00b404c0169af62',
    'api-username: productsupport'
);
curl_setopt($curl, CURLOPT_POST, 1);
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 response
$output = json_decode($resp, true);
if($output !== NULL) {
    //json was valid. Dump the decoded array
    print_r($output);
}
else {
    //invalid json, just dump the raw response
    print_r($resp);
}
// Close request to clear up some resources
curl_close($curl);
?>