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

# Outstanding invoice reminder emails

> Enable the automated weekly Firmhouse email that reminds non-paying customers of their outstanding invoices and prompts them to pay manually.

You can set up an email that automatically reminds your non-paying customers of their outstanding invoices. This email is disabled by default and sends out once a week to every non-paying customer when enabled.

A customer is marked as non-paying when a recurring charge fails for any other reason than insufficient funds, or when the same payment fails 3 times due to insufficient funds.

## Step 1: Enable the email

### Steps

1. Navigate to **Settings > Email configuration** in the sidebar
2. Find the **Outstanding invoices** email under the **Payments** section
3. Toggle the email to **Enabled**
4. Click **Save**

<img src="https://mintcdn.com/firmhousebv/881pIJTzLJejkpLe/images/docs-configure-payment-dunning-outstanding-invoice-reminders-settings-dev-aa.png?fit=max&auto=format&n=881pIJTzLJejkpLe&q=85&s=f83ef557c7aef6bd2592dd3449b53c10" alt="Outstanding Invoices Email Settings" width="2880" height="1920" data-path="images/docs-configure-payment-dunning-outstanding-invoice-reminders-settings-dev-aa.png" />

## Step 2: Setting up the email

It's up to you what you want to include in the email. We recommend using the standard template by clicking the **Load example content** button.

### Steps

1. Click **Load example content** to load the standard HTML template
2. Customize the email subject line and content as needed
3. Use the **Send Test Email** button to preview how it looks
4. Click **Save** to save your changes

<img src="https://mintcdn.com/firmhousebv/881pIJTzLJejkpLe/images/docs-configure-payment-dunning-outstanding-invoice-reminders-content-dev-aa.png?fit=max&auto=format&n=881pIJTzLJejkpLe&q=85&s=03dc44b68e3a305638ca4e46bf2103b4" alt="Outstanding Invoices Email Content" width="2880" height="1920" data-path="images/docs-configure-payment-dunning-outstanding-invoice-reminders-content-dev-aa.png" />

## Customising your email

You can add and change as much as you want in this email. In order for the invoices and their payment links to show up properly, we advise you to not change anything in the `<table>` element. You can rename the column labels, but the logic shouldn't be touched.

For example, if you need to change the "Amount" label, you can update it like this:

```html theme={null}
<th style="background-color: #f1f1f1;">Amount due</th>
```

## Advanced: Build it yourself

To retrieve outstanding invoices in your email template, you need to loop through `outstanding_invoices`. Here's a simple example that returns the invoice number of all outstanding invoices:

```liquid theme={null}
{% for invoice in outstanding_invoices %}
  {{ invoice.number }}
{% endfor %}
```

Putting that information in a table would look like this:

```html theme={null}
<table>
  <thead>
    <tr>
      <th>Invoice no.</th>
    </tr>
  </thead>
  {% for invoice in outstanding_invoices %}
    <tbody>
      <tr>
        <td>{{ invoice.number }}</td>
      </tr>
    </tbody>
  {% endfor %}
</table>
```

## Supported attributes

The following attributes are available for outstanding invoices:

* `number` - The invoice number
* `amount` - The invoice amount
* `status` - The current status
* `pending_retries?` - Whether retries are pending
* `pay_now_url` - The URL for the customer to pay
* `created_at` - When the invoice was created

For more information about Liquid tags, see the [Dynamic Email Liquid Tags](/configure/customer-communication/liquid-tags) documentation.
