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

This method removes one or more child `Accounts` from the parent `Account`.

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

*parent*: the `Account` that should be parent to these children.

*child*: the child or children that should be removed from this parent account.

*payerReplacementBehavior*: an object of type `AccountPayerReplacementBehavior`, that controls how existing `AutoBills` of the children are affected.

`AccountPayerReplacementBehavior` may contain the following strings:

| `ReplaceOnAllAutoBills` | This option will replace the Payment Method on each of the child’s AutoBills with the child’s default (index\_number = 0) Payment Method. If the child does not have any Payment Methods, Subscribe will set the Payment Method ID on the child's AutoBills to null. When Subscribe later tries to process a Transaction for one of these AutoBills, it will detect the absence of a Payment Method, and send an email to the (child) account. |
| - | - |
| `ReplaceOnlyFutureAutoBills` | This option will simply break the link between the parent and child Accounts, leaving the parent's Payment Methods unavailable to the child when creating new AutoBills. If a parent/child relationship is broken in this manner, and a subsequent `AutoBill.update` call is made against one of the child's AutoBills, Subscribe may detect that the Payment Method on the child's AutoBill is no longer associated with the child, and issue an error. |

## Output

*return*: an object of type `Return` that indicates the success or failure of the call.

## Returns

This method returns the codes listed in [The Return Object](The_Return_Object).

## Example

```

$parentAcct = new Account();

// account id for an existing account that is the parent
$parentAcct->setMerchantAccountId('dad-101);
$childAcct2 = new Account();

// account id of an existing child
$childAcct2->setMerchantAccountId('son-102);

// On each of the children that were deleted, correct 
// the existing autobills to use the child's payment 
// method instead of the parent's for any of the old 
// parent's payment methods.
$payerReplacementBehavior = 'ReplaceOnAllAutoBills';
$response = $parentAcct->removeChildren (array($childAcct2),$payerReplace);

if ($response['returnCode'] == 200) {
   // child successfully removed
}
else {
   // Error while removing the child
   print $response['returnString'] . "\n";
}
```

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


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