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

# How to Invoice Customers and Run Dunning

> Generate, send, and track customer invoices in DualEntry, then configure automated dunning sequences and reminders for overdue receivables.

Invoices in DualEntry represent amounts your customers owe you. You create them manually, generate them from sales orders, or schedule them as recurring charges. Automated dunning handles follow-up on overdue accounts so you can focus on exceptions rather than routine collection calls.

## Creating invoices

Navigate to **Accounts Receivable → Invoices → New Invoice**, or send a `POST` to `/public/v2/invoices/`. Select a customer, set the invoice date and payment terms, and add line items. Each line item includes a description, quantity, unit price, revenue account, and optional classification dimensions for segment reporting.

DualEntry validates required fields before allowing submission. The customer must be active, the invoice date cannot fall in a closed period, and each line item must reference a valid revenue account. If tax applies, DualEntry calculates it based on the tax code assigned to the line item and the customer's tax-exempt status, posting the tax amount to a separate liability account.

Group related charges on a single invoice rather than issuing multiple invoices for the same customer and period. This simplifies payment application and reduces customer confusion.

## Uploading attachments

You can attach supporting documents (PDFs, contracts, signed purchase orders, time sheets, delivery receipts, or scanned backup) directly to an invoice. Attachments travel with the invoice for the life of the record and appear on the customer-facing PDF and portal view when you choose to include them.

**From the UI:**

1. Open the invoice from **Accounts Receivable → Invoices**, or create a new one.
2. Scroll to the **Attachments** section at the bottom of the invoice form.
3. Select **Upload file**, or drag and drop the file (for example, a PDF) into the drop zone.
4. Optionally, add a short description and toggle **Include on customer PDF** if you want the file to be sent along with the invoice email.
5. Save the invoice to persist the attachment.

You can upload multiple files per invoice. Supported types include PDF, PNG, JPG, DOCX, XLSX, and CSV, up to 25 MB per file.

**Via the API:**

Send a `multipart/form-data` `POST` to `/public/v2/invoices/{record_number}/attachments/` with the file in the `file` field. For example:

```bash theme={null}
curl -X POST https://api.dualentry.com/public/v2/invoices/INV-1042/attachments/ \
  -H "Authorization: Bearer $DUALENTRY_TOKEN" \
  -F "file=@./signed-contract.pdf" \
  -F "description=Signed master service agreement" \
  -F "include_on_customer_pdf=true"
```

The response returns the attachment ID, filename, size, and a signed download URL. List existing attachments with `GET /public/v2/invoices/{record_number}/attachments/`, and remove one with `DELETE /public/v2/invoices/{record_number}/attachments/{attachment_id}/`.

Attachments are immutable once uploaded: to correct a file, delete the existing attachment and upload a new one. Every upload and deletion is recorded in the [audit trail](../../platform-configuration/audit-trail-and-compliance).

## Approval and sending

Invoices support [approval workflows](../../platform-configuration/approval-workflows) with the `invoice` record type. You might require approval for invoices above a dollar threshold, for certain customers, or for specific revenue accounts. Approved invoices move to `approved` status and become eligible for sending.

Once approved, you send invoices to customers via email directly from DualEntry. The system generates a PDF and tracks delivery status. Customers see the invoice in their email with a link to view or download.

You can also export invoices for delivery through your own channels. The API returns the invoice data in JSON for integration with external billing portals or EDI systems. If you use a customer-facing portal, DualEntry can push invoice data to it automatically via [webhook integrations](../../platform-configuration/audit-trail-and-compliance), keeping your external systems in sync without manual exports.

## Recurring invoices

For subscription charges, retainers, or other repeating fees, set up a recurring invoice. Navigate to **Accounts Receivable → Recurring Invoices**, or use `/public/v2/recurring/invoices/`. Define the customer, line items, frequency, and date range.

DualEntry generates a draft invoice on each scheduled date. The draft enters the normal approval and sending workflow. You can pause or cancel a recurring invoice at any time without affecting previously generated invoices.

Recurring invoices are useful when the amount and line items are consistent across periods. If charges vary (for example, usage-based billing or time-and-materials work), you may prefer to create invoices manually or generate them from [sales orders](./order-management). You can also update the recurring template between cycles; changes apply to all future drafts without affecting invoices already generated.

## Dunning - automated payment reminders

Dunning automates follow-up on overdue invoices. You configure dunning sequences that define when and how DualEntry contacts customers about past-due balances.

A dunning sequence consists of steps, each with a trigger (number of days past due), a communication method (email), and a message template. A typical sequence might look like:

* **Day 1 past due** - friendly reminder that payment is due.
* **Day 15 past due** - second reminder with the outstanding balance.
* **Day 30 past due** - escalation notice with a warning about service impact.

DualEntry sends the appropriate message automatically and logs every communication on the invoice record. If a customer pays before the next step triggers, the sequence stops.

You can assign different dunning sequences to different customer segments. High-value customers might get a gentler cadence, while smaller accounts follow a more aggressive schedule. Create multiple sequences under **Settings → Dunning Sequences** and assign them to customers by customer group or individually.

## Credit memos and voiding invoices

When you need to reduce a customer's balance (for a returned product, a pricing adjustment, or a billing error), issue a credit memo. Navigate to **Accounts Receivable → Customer Credits**, or use `/public/v2/customer-credits/`. The credit memo debits revenue and credits accounts receivable.

Open credits appear in the customer's account balance. You can apply them to outstanding invoices during [payment recording](./customer-payments), or [refund them directly](./customer-payments#customer-refunds) to the customer.

To void a posted invoice, open the invoice and select **Void**. Voiding creates a reversing entry that clears the receivable. The invoice status changes to `voided` and it no longer appears in aging reports. Use voiding when the entire invoice is invalid: for duplicate invoices, invoices sent to the wrong customer, or invoices for cancelled orders. For partial adjustments, a credit memo is the better approach because it preserves the original invoice as a valid record.

<Warning>
  You cannot void an invoice that has payments applied to it. Reverse the [customer payment](./customer-payments) first, then void the invoice.
</Warning>
