Account.stopAutoBilling
Web Session Object
Transaction Object
Token Object
Season Set Object
Refund Object
RatePlan Object
Product Object
Payment Provider Object
Payment Method Object
NameValuePair Object
GiftCard Object
Entitlement Object
Chargeback Object
Campaign Object
BillingPlan Object
AutoBill Object
Address Object
Activity Object
Account Object
Account.stopAutoBilling
The stopAutoBilling method cancels one or more AutoBill objects (subscriptions) associated with this Account object. Rather than making separate cancel calls, cancel the AutoBill objects in a single call with this method.
Input
srd: sparse response description, a SOAP string (which must be a JSON object), in which you specify the elements you want returned.This parameter enables the calling system to constrain a method call to return only components you specify. This gives you greater control over returned content, and improves response time within the Vindicia platform by reducing the processing needed for the call.
Some fields are required, either practically or in the WSDL, and will be returned regardless of the srd. A null srd returns the complete response.
account: the Account object for which one or more AutoBill objects will be stopped. Use the merchantAccountId or VID to identify the object.
autobills: an array of one or more AutoBill objects to cancel. If you do not specify this parameter, this method cancels all AutoBill objects associated with the Account.
disentitle: a Boolean flag that specifies whether or not the customer is immediately denied further access to a product or service. Set disentitle to true to cancel the customer’s subscription access immediately, and to false to allow the customer continued access until the currently paid subscription expires.
force: a Boolean flag that, if set to true, stops the AutoBill even if the subscription has not yet expired. (This parameter is a placeholder, and is not in use.)
Output
return: an object of type Return that indicates the success or failure of the call.
account: the Account object for which this method stopped one or more AutoBills.
Returns
In addition to those listed in Standard Return Codes, this call returns:
Return Code |
Return String |
400 |
Base Account not specified. |
Example
// to stop all auto billing for an account
$customerID = '1234-5678-9000';
// Create an account object
$account = new Account();
// Set merchant account id in it so CashBox knows which account
// the autobills are to be cancelled
$account->setMerchantAccountId($customerID);
// To specify the autobills to cancel, construct AutoBill objects
$autobill1 = new AutoBill();
$autobill1->setMerchantAutoBillId('xyz-111');
$autobill2 = new AutoBill();
$autobill2->setMerchantAutoBillId('abc-222');
$autobillsToCancel = array($autobill1, $autobill2);
$immediateDisentitlement = true;
$response =
$account->stopAutoBilling($autobillsToCancel,
$immediateDisentitlement, false);
if($response['returnCode'] == 200) {
print "Ok\n";
}
else if ($response['returnCode'] == 400) {
print "Could not find account to cancel autobills for \n";
}
For Users
Learn More