<?php

/**
 * Example of deleting a customer from ChargeOver 
 */
header('Content-Type: text/plain');
// Require the library
require '../ChargeOverAPI.php';
// This url should be specific to your ChargeOver instance
$url = 'http://dev.chargeover.com/api/v3';
//$url = 'https://YOUR-INSTANCE-NAME.chargeover.com/api/v3';
// You should substitute your API credentials in here
$authmode = ChargeOverAPI::AUTHMODE_HTTP_BASIC;
$username = '******';
$password = '******';
$API = new ChargeOverAPI($url, $authmode, $username, $password);
// This is the unique creditcard ID value
$the_creditcard_id = 43;
// Delete them
$resp = $API->delete(ChargeOverAPI_Object::TYPE_CREDITCARD, $the_creditcard_id);
// Check for errors
if (!$API->isError($resp)) {
    print 'Credit card was deleted!';
} else {
    print 'The credit card COULD NOT BE DELETED!';
    print "\n\n\n\n";
    print $API->lastRequest();
    print "\n\n\n\n";
    print $API->lastResponse();
    print "\n\n\n\n";
}
<?php

/**
 * Example of deleting a customer from ChargeOver 
 */
header('Content-Type: text/plain');
// Require the library
require '../ChargeOverAPI.php';
// This url should be specific to your ChargeOver instance
$url = 'http://dev.chargeover.com/api/v3';
//$url = 'https://YOUR-INSTANCE-NAME.chargeover.com/api/v3';
// You should substitute your API credentials in here
$authmode = ChargeOverAPI::AUTHMODE_HTTP_BASIC;
$username = '******';
$password = '******';
$API = new ChargeOverAPI($url, $authmode, $username, $password);
// This is the unique customer ID value
$the_ach_id = 1;
// Delete them
$resp = $API->delete(ChargeOverAPI_Object::TYPE_ACH, $the_ach_id);
// Check for errors
if (!$API->isError($resp)) {
    print 'ACH was deleted!';
} else {
    print 'The ACH COULD NOT BE DELETED!';
    print "\n\n\n\n";
    print $API->lastRequest();
    print "\n\n\n\n";
    print $API->lastResponse();
    print "\n\n\n\n";
}
<?php

/**
 * Example of deleting a customer from ChargeOver 
 */
header('Content-Type: text/plain');
// Require the library
require '../ChargeOverAPI.php';
// This url should be specific to your ChargeOver instance
$url = 'http://dev.chargeover.com/api/v3';
//$url = 'https://YOUR-INSTANCE-NAME.chargeover.com/api/v3';
// You should substitute your API credentials in here
$authmode = ChargeOverAPI::AUTHMODE_HTTP_BASIC;
$username = '******';
$password = '******';
$API = new ChargeOverAPI($url, $authmode, $username, $password);
// This is the unique user ID value
$the_user_id = 123348;
// Delete them
$resp = $API->delete(ChargeOverAPI_Object::TYPE_USER, $the_user_id);
// Check for errors
if (!$API->isError($resp)) {
    print 'User was deleted!';
} else {
    print 'The user COULD NOT BE DELETED!';
    print "\n\n\n\n";
    print $API->lastRequest();
    print "\n\n\n\n";
    print $API->lastResponse();
    print "\n\n\n\n";
}
<?php

/**
 * Example of deleting a customer from ChargeOver 
 */
header('Content-Type: text/plain');
// Require the library
require '../ChargeOverAPI.php';
// This url should be specific to your ChargeOver instance
$url = 'http://dev.chargeover.com/api/v3';
//$url = 'https://YOUR-INSTANCE-NAME.chargeover.com/api/v3';
// You should substitute your API credentials in here
$authmode = ChargeOverAPI::AUTHMODE_HTTP_BASIC;
$username = '******';
$password = '******';
$API = new ChargeOverAPI($url, $authmode, $username, $password);
// This is the unique tokenized ID value
$the_tokenized_id = 1;
// Delete them
$resp = $API->delete(ChargeOverAPI_Object::TYPE_TOKENIZED, $the_tokenized_id);
// Check for errors
if (!$API->isError($resp)) {
    print 'Tokenized info was deleted!';
} else {
    print 'The tokenized info COULD NOT BE DELETED!';
    print "\n\n\n\n";
    print $API->lastRequest();
    print "\n\n\n\n";
    print $API->lastResponse();
    print "\n\n\n\n";
}
/**
 * Example of deleting a customer from ChargeOver 
 */
header('Content-Type: text/plain');
// Require the library
require '../ChargeOverAPI.php';
// This url should be specific to your ChargeOver instance
$url = 'http://dev.chargeover.com/api/v3';
//$url = 'https://YOUR-INSTANCE-NAME.chargeover.com/api/v3';
$authmode = ChargeOverAPI::AUTHMODE_HTTP_BASIC;
$username = '******';
$password = '******';
$API = new ChargeOverAPI($url, $authmode, $username, $password);
// This is the unique customer ID value
$the_invoice_id = 12998;
// Delete them
$resp = $API->delete(ChargeOverAPI_Object::TYPE_INVOICE, $the_invoice_id);
// Check for errors
if (!$API->isError($resp)) {
    print 'Invoice was deleted!';
} else {
    print 'The invoice COULD NOT BE DELETED!';
    print "\n\n\n\n";
    print $API->lastError();
    print "\n\n\n\n";
    print $API->lastRequest();
    print "\n\n\n\n";
    print $API->lastResponse();
    print "\n\n\n\n";
}
<?php

header('Content-Type: text/plain');
require '../ChargeOverAPI.php';
//This url should be specific to your ChargeOver instance
$url = 'http://dev.chargeover.com/api/v3';
//$url = 'https://YOUR-INSTANCE-NAME.chargeover.com/api/v3';
$authmode = ChargeOverAPI::AUTHMODE_HTTP_BASIC;
$username = '******';
$password = '******';
$API = new ChargeOverAPI($url, $authmode, $username, $password);
$the_resthook_id = 3;
// Create the user
$resp = $API->delete(ChargeOverAPI_Object::TYPE_RESTHOOK, $the_resthook_id);
// Check for errors
if (!$API->isError($resp)) {
    print 'SUCCESS!';
    print_r($resp);
} else {
    print 'Error deleting resthook via API';
    print "\n\n";
    print $API->lastRequest() . "\n\n";
    print $API->lastResponse() . "\n\n";
}