Cancel a pending fax with CancelFax

25 Nov 2016 This code sample is deprecated and in process of being removed. Check out our new code libraries and usage documentation on InterFAX @ Github.

This sample demonstrates how to cancel a previously-submitted outbound fax.

Note that this will have effect only on faxes that are awaiting sending (i.e. status codes: -1 Preprocessing, -2 Ready, and some -3 Pending Retry) and not faxes that are actively being transmitted.


/**************** Settings begin **************/

$username  = '';   // Enter your Interfax username here
$password  = ''; // Enter your Interfax password here
$tx_id     = '';  // Transaction ID of the fax to be cancelled

/**************** Settings end ****************/

$client = new SoapClient("");

$params->Username       = $username;
$params->Password       = $password;
$params->TransactionID  = $tx_id;

$result = $client->CancelFax($params);  // returns 0 if cancellation succeeded

if ($result->CancelFaxResult <> 0) echo 'Cancellation Error: ' . $result->CancelFaxResult . '';


Contact us today

Talk to a member of our team about the benefits InterFAX can bring to your organization's communications processes.

Contact us today