# Mechanism for deducting accrued fee debt

Accrued fee debt refers to the amount of fees charged to to an investor for their subscriptions but couldn't be deducted due to insufficient funds on the investment account. This debt is recorded separately for each [fee type](/copy-trading-pamm-and-mam-concepts/fee-list.md).

When funds are added to the investment account, the debt deduction mechanism is triggered immediately after the standard fee calculation and deduction process for the investor is completed, which occurs in the following cases:

* When the payment period specified in a fee plan is reached
* When withdrawing funds from an investment account with active subscriptions
* When unsubscribing from a master account

## Example 1

Suppose the investment account has the accrued Management fee debt of `48` USD.

The investor deposits `20` USD to their investment account, which isn't enough to cover the full accrued debt. When the debt deduction mechanism is triggered for the investment account, only part of the Management fee debt is deducted. The remaining debt of `28` USD is retained.

Balance operations related to fee debt deductions include comments in the following formats:

* For the *investment account* from which the fee debt is deducted:

  `-<fee type> AD|<master account number>|`
* For the *master account* to which the amount is credited:

  `<fee type> AD|<investment account number>|<ID of the balance operation for fund deduction>|`

This is how the comment appears for the deduction of accrued fee debt from the investment account in the MT Manager:

<figure><img src="/files/sCwWT6D2MrKjPwvWCXLl" alt="Comment to the fee debt deduction in the MT Manager"><figcaption><p>Comment to the fee debt deduction in the MT Manager</p></figcaption></figure>

## Example 2

Suppose that the investment account has accrued fee debts across several fee types:

* the Management fee debt of `28` USD
* the Performance fee debt of `2.30` USD
* the Subscription fee debt of `10` USD

The investor deposits `30` USD to their investment account, which is insufficient to cover the full amount of the accrued debts. The debts are deducted starting from the most recently recorded one. Both Subscription and Performance fee debts are fully deducted in this process. Additionally, `17.70` USD is deducted from the Management fee debt, while the remaining `10.30` USD of the Management fee debt is retained.

This is how the comments appear for accrued fee debt deductions from the investment account in the MT Manager:

<figure><img src="/files/2yf0jXbWJpTzjNKVf7BH" alt="Comments to fee debt deductions in the MT Manager"><figcaption><p>Comments to fee debt deductions in the MT Manager</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.b2copy.b2broker.com/copy-trading-pamm-and-mam-concepts/mechanism-for-deducting-accrued-fee-debt.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
