> For the complete documentation index, see [llms.txt](https://wallee.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wallee.gitbook.io/documentation/activate-your-account/reconciliation-accounting/wallee-accounting-capabilities/dunning/managing-dunning.md).

# Managing Dunning

## Derecognizing an invoice

When an invoice can no longer be collected, it can be **derecognized** – either manually or automatically after the last dunning level. The open amount is then written off as a bad debt.

What happens in {inject-platform-name}:

* The system automatically creates a refund of type **Customer Initiated: Automatic** with the external ID `derecognized-invoice-<invoice ID>`.
* This refund is booked **offline** – no money is paid out to the customer. It only offsets the amount that is still open on the invoice (not the full invoice amount).
* In the portal, the refund is shown as a reversal initiated by the customer, and the customer is shown as having reversed payments. This is why a derecognized invoice can look like a chargeback.
* Derecognize is no longer possible once the invoice has been partially paid.

{% hint style="info" %}
Derecognize is meant for uncollectible receivables. To cancel an invoice without booking a loss, see [Account Receivables / Account Payables](/documentation/activate-your-account/reconciliation-accounting/wallee-accounting-capabilities/account-receivables-account-payables.md#cancelling-an-invoice).
{% endhint %}
