Deletes a customer's bank account.
curl https://api.stripe.com/v1/customers/cus_CBbg3iRMzWBjoe/sources/ba_1BnETKGswQrCoh0XzgjB3t99 \
-u STRIPE_SECRET_KEY: \
-X DELETE
<?php
// The version number (9_5_0) should match version of the Chilkat extension used, omitting the micro-version number.
// For example, if using Chilkat v9.5.0.48, then include as shown here:
include("chilkat_9_5_0.php");
$rest = new CkRest();
// URL: https://api.stripe.com/v1/customers/cus_CBbg3iRMzWBjoe/sources/ba_1BnETKGswQrCoh0XzgjB3t99
$bTls = true;
$port = 443;
$bAutoReconnect = true;
$success = $rest->Connect('api.stripe.com',$port,$bTls,$bAutoReconnect);
if ($success != true) {
print 'ConnectFailReason: ' . $rest->get_ConnectFailReason() . "\n";
print $rest->lastErrorText() . "\n";
exit;
}
$rest->SetAuthBasic('STRIPE_SECRET_KEY','');
$sbResponseBody = new CkStringBuilder();
$success = $rest->FullRequestNoBodySb('DELETE','/v1/customers/cus_CBbg3iRMzWBjoe/sources/ba_1BnETKGswQrCoh0XzgjB3t99',$sbResponseBody);
if ($success != true) {
print $rest->lastErrorText() . "\n";
exit;
}
$jsonResponse = new CkJsonObject();
$jsonResponse->LoadSb($sbResponseBody);
$deleted = $jsonResponse->BoolOf('deleted');
$id = $jsonResponse->stringOf('id');
?>
{
"deleted": true,
"id": "ba_1BnETKGswQrCoh0XzgjB3t99"
}