> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slm.m1amdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Account.stopAutoBilling

Use the `stopAutoBilling` method to cancel one or more `AutoBill` objects (subscriptions) associated with an `Account` object. Rather than making separate `cancel` calls for each `AutoBill`, you can cancel all active `AutoBill` objects in a single call with this method. Note, however, that any `AutoBill`with a future start date (status: Pending Activation) will not be automatically canceled. Use `AutoBill.cancel()` to cancel any AutoBills whose activation is pending.

## 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.)

*cancelReason*: (Optional) reason for canceling the AutoBill. You can use predefined Subscribe cancel reason codes, or define additional codes using the Subscribe Portal or the API. (See Canceling AutoBills with Reason Codes in the Subscribe Programmer’s Guide.) Supplying an undefined cancel reason code may result in an error.

## 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`.

*autobill*: the AutoBill object that was canceled.

## Returns

In addition to those listed in [The Return Object](The_Return_Object), 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 Subscribe 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->set('xyz-111');

$autobill2 = new AutoBill();
$autobill2->set('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"; 
}
```

**Parent topic:**[Account Methods](../topics/Account_Methods)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.