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

# Dunning

> Automated dunning for invoices

With the dunning system, reminders and payment notifications for invoices can be created automatically.
Dunning can be activated for all invoices or only for selected invoices.

## Set Up Dunning

Dunning can be set up with simple rules.
Fundamentally, regardless of the type, a PDF document is created and sent to the customer via email.

The email templates and the created PDF document can be individually customized for each level.

### Payment Reminders

<Tabs>
  <Tab title="Use Web App">
    <Steps>
      <Step title="Open Settings">
        Open the settings and select the ["Dunning"](https://app.fynn.eu/settings/payment-failures) tab.
      </Step>

      <Step title="Set Up Level">
        Select one of the predefined levels and the type of level.

        <Frame>
          <img src="https://mintcdn.com/fynnsubscriptionbilling/tzBoVhlU_naKbmRt/images/dunning-settings-overview.png?fit=max&auto=format&n=tzBoVhlU_naKbmRt&q=85&s=b2e4feedac1867d8af781e498c34635a" alt="Dunning levels" width="1134" height="307" data-path="images/dunning-settings-overview.png" />
        </Frame>
      </Step>

      <Step title="Original Invoice Copy">
        Choose whether the original invoice should be attached as a copy to the email.

        <Frame>
          <img src="https://mintcdn.com/fynnsubscriptionbilling/tzBoVhlU_naKbmRt/images/dunning-original-invoice-toggle.png?fit=max&auto=format&n=tzBoVhlU_naKbmRt&q=85&s=1fdb8e54b96bca6a9a58ec62ad0c1df7" alt="Original invoice copy" width="416" height="42" data-path="images/dunning-original-invoice-toggle.png" />
        </Frame>
      </Step>

      <Step title="Configure Days Overdue">
        Adjust the number of days the invoice must be overdue for the dunning level to be triggered.

        <Tip>
          If a dunning level has already been triggered, the number of days is calculated from the creation date of the dunning document of the last dunning level.
          The payment term of the dunning level is not relevant.
        </Tip>

        <Frame>
          <img src="https://mintcdn.com/fynnsubscriptionbilling/tzBoVhlU_naKbmRt/images/dunning-days-overdue-input.png?fit=max&auto=format&n=tzBoVhlU_naKbmRt&q=85&s=2bf22227d785f187c66de1a5b07d5c0b" alt="Days overdue" width="264" height="79" data-path="images/dunning-days-overdue-input.png" />
        </Frame>
      </Step>

      <Step title="Payment Term">
        Adjust the payment term. This is used to calculate the due date of the dunning level.
        The payment term is added to the date the dunning level is executed.

        <Frame>
          <img src="https://mintcdn.com/fynnsubscriptionbilling/tzBoVhlU_naKbmRt/images/dunning-due-in-days-input.png?fit=max&auto=format&n=tzBoVhlU_naKbmRt&q=85&s=699bf4665a8f9f3420f416155e8b988d" alt="Payment term" width="213" height="84" data-path="images/dunning-due-in-days-input.png" />
        </Frame>
      </Step>

      <Step title="Customize Email Template">
        The email template can be customized as desired. Generate a preview by clicking "Send Test Email".
        At this time, the email can only contain text.

        **The following placeholders are available**

        * `{{ referencedInvoiceNumber }}` - Invoice number
        * `{{ referencedInvoiceDate }}` - Invoice date
        * `{{ totalGrossAmount }}` - Invoice amount (gross) (possibly including dunning fees)
        * `{{ dueDate }}` - Due date of the payment reminder / dunning notice
        * `{{ tenant.name }}` - Organization name from [general settings](https://app.fynn.eu/settings)

        <Frame>
          <img src="https://mintcdn.com/fynnsubscriptionbilling/tzBoVhlU_naKbmRt/images/dunning-email-template-settings.png?fit=max&auto=format&n=tzBoVhlU_naKbmRt&q=85&s=bb26a6decf9c2b430d94be9c62e41564" alt="Email template" width="886" height="293" data-path="images/dunning-email-template-settings.png" />
        </Frame>
      </Step>

      <Step title="Customize PDF Template">
        Customize the PDF template as desired. Generate a preview by clicking "Create Test PDF Document".

        <Frame>
          <img src="https://mintcdn.com/fynnsubscriptionbilling/tzBoVhlU_naKbmRt/images/dunning-pdf-template-settings.png?fit=max&auto=format&n=tzBoVhlU_naKbmRt&q=85&s=913e0a722cfbefb7e8346544f864a94c" alt="PDF template" width="882" height="1083" data-path="images/dunning-pdf-template-settings.png" />
        </Frame>
      </Step>

      <Step title="Activate Level">
        The dunning level can now be activated or deactivated via the "Active" toggle.
      </Step>

      <Step title="Save Level">
        Now save the settings made by clicking "Save Changes".
      </Step>

      <Step title="Dunning Level Successfully Set Up">
        The dunning level has been successfully set up and will be automatically triggered for **existing and future** invoices that meet the defined criteria.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Use API">
    Use the [Update Dunning Level](/api-reference/overduerule/update-overdue-rule) endpoint for this.

    ```bash theme={null}
    PUT /dunning/overdue-rules/{id}
    ```

    Alternatively, you can [retrieve dunning levels](/api-reference/overduerule/get-overdue-rules).
  </Tab>
</Tabs>

### Dunning Notices

Setting up dunning notices is analogous to payment reminders. Additionally, dunning fees can be charged and letter dispatch can be configured.

#### Dunning Fees

Dunning fees can be configured per dunning level. The dunning fees are added to the invoice amount (gross).

<Info>
  At this time, dunning fees are not included in accounting exports.
</Info>

#### Letter Dispatch

Letter dispatch can be configured per dunning level.
The dunning PDF document is printed in color on one side and sent via our partner for letter dispatch.

Prices for letter dispatch can be found in the price list.

## Suspend Dunning

Suspending dunning can be set up on 3 levels:

1. Global
2. For individual customers
3. For individual invoices

When dunning is reactivated, all invoices that have become overdue in the meantime are taken into account.
The next dunning level that is calculated based on the current invoice status takes effect.

### Global

To suspend dunning globally, this can be configured in the settings (Settings > "Dunning" tab) on the respective dunning levels.
If dunning should be completely suspended, all dunning levels must be deactivated.

### For Individual Customers

In the customer master data, dunning can be suspended for the respective customer.

<Steps>
  <Step title="Open Customer Master Data">
    Open the customer master data for the customer for whom dunning should be suspended.
  </Step>

  <Step title="Open &#x22;Settings&#x22; Tab">
    Suspend dunning for the customer by activating the "Disable Dunning" toggle.
    Additionally, it is possible to deactivate dunning fees for individual customers via the "Apply Fees" toggle.

    <Frame>
      <img src="https://mintcdn.com/fynnsubscriptionbilling/tzBoVhlU_naKbmRt/images/dunning-customer-settings.png?fit=max&auto=format&n=tzBoVhlU_naKbmRt&q=85&s=851f6b332b119fa4cd9d7bb1b089331d" alt="Customer master data settings" width="1130" height="256" data-path="images/dunning-customer-settings.png" />
    </Frame>
  </Step>

  <Step title="Save Changes">
    Save the changes by clicking "Save".
  </Step>
</Steps>

### For Individual Invoices

In the invoice details, dunning can be suspended for the respective invoice.

<Steps>
  <Step title="Open Invoice Details">
    Open the invoice details for the invoice for which dunning should be suspended.
  </Step>

  <Step title="Pause Dunning">
    Suspend dunning for the invoice by selecting the "Pause" button below the invoice details in the "Dunning" section.

    <Tip>
      Any open payment reminders or dunning notices at this time will remain in place.
    </Tip>

    <Frame>
      <img src="https://mintcdn.com/fynnsubscriptionbilling/tzBoVhlU_naKbmRt/images/dunning-invoice-settings.png?fit=max&auto=format&n=tzBoVhlU_naKbmRt&q=85&s=99c3d2fb270a5d4a2f1a8766766d09f7" alt="Invoice details settings" width="368" height="149" data-path="images/dunning-invoice-settings.png" />
    </Frame>
  </Step>

  <Step title="Reactivate Dunning">
    To reactivate dunning for the invoice, click the "Resume" button.

    The next valid dunning level for the invoice is then determined and dunning continues accordingly.

    <Frame>
      <img src="https://mintcdn.com/fynnsubscriptionbilling/tzBoVhlU_naKbmRt/images/dunning-invoice-settings-continue.png?fit=max&auto=format&n=tzBoVhlU_naKbmRt&q=85&s=fba5c6582c4595e9f8aec12383a28311" alt="Invoice details settings" width="368" height="149" data-path="images/dunning-invoice-settings-continue.png" />
    </Frame>
  </Step>
</Steps>

## Record Payment Receipt

## Examples

### Standard

**The following rule set is configured**

* The **1st payment reminder** should be sent after 14 days.
* The **2nd payment reminder** should be sent after 7 days.
* The **3rd payment reminder** should be sent after 7 days.
* The **1st dunning notice** should be sent after 7 days.

**The following process applies**

* The invoice is due on May 10.
* The <b>1st payment reminder</b> is created on May 24.
* The <b>2nd payment reminder</b> is created on May 31.
* The **3rd payment reminder** is created on June 7.
* The **1st dunning notice** is created on June 14.

### Suspended Dunning

**The following rule set is configured**

* The **1st payment reminder** should be sent after 14 days.
* The **2nd payment reminder** should be sent after 7 days.
* The **3rd payment reminder** should be sent after 7 days.

**The following process applies**

* The invoice is due on May 10.
* The <b>1st payment reminder</b> is created on May 24.
* Dunning is deactivated on May 25.
* Dunning is reactivated on June 1.
* The <b>2nd payment reminder</b> is created after reactivation on June 1, as the previous payment reminder is already more than 7 days overdue.
* The **3rd payment reminder** is created on June 8, as only then is the 2nd payment reminder more than 7 days overdue.
