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

# Accounting periods

> Which date drives which report, and how to attribute revenue and costs to the right period.

Accounting needs revenue and the matching costs in the same period, whatever the dates of invoicing and payment. Nocotax keeps three dates for that purpose.

## The three dates

| Date | Field | Set by | Answers |
| - | - | - | - |
| Service date or period | `period` on the document and on each line | You | Which period does this revenue or cost belong to? |
| Invoice date | `document_date` | Nocotax, at finalization | When was the invoice issued? |
| Payment date | `paid_at` in exports | Nocotax, when you record the payment | When was it settled? |

`document_date` is the day you finalize the invoice (in the timezone of the supplier). It cannot be set through the API. If you finalize on January 3 an invoice for a service delivered in December, `document_date` is January 3.

Reports attribute a line to the **accounting period** of its `period` when it is set, and to `document_date` otherwise. Always providing `period` therefore decouples accounting from your integration's timing.

## Fill `period` on every line

| Case | `period` |
| - | - |
| One-off service or product delivered on a day | `start` and `end` on that day. `end` must be greater than or equal to `start`. |
| Subscription or service over a duration | The covered interval. |
| Purchase line for an order | The same `period` as the sales line of the same order. |
| Credit note line | The `period` of the line it corrects. |

Lines inherit the `period` of the document when they do not set their own. On purchase invoices that aggregate several orders, set it on each line.

Send ISO 8601 timestamps, for example `2025-12-15T00:00:00Z`.

## What this gives you

* **Monthly accounts**: revenue and the corresponding supplier costs fall in the same month, even if the purchase invoice is issued or paid later.
* **Year-end cut-off**: December services invoiced or paid in January are identified by an accounting period of December and a `document_date` or `paid_at` in January. See [Reconciliation and close](https://docs.nocotax.app/undisclosed-agents/reconciliation-and-close.md).
* **Margin per order**: both sides of an order are in the same period.

## VAT

The accounting period is not the VAT period. Tax is calculated and reported by Nocotax from the tax data of the documents. Do not use `period` to move a transaction from one VAT return to another.

## Rules of thumb

* Finalize invoices promptly, so that `document_date` stays close to the service date.
* Never edit a finalized invoice. Correct it with a credit note that repeats the original `period`: see [Refunds and cancellations](https://docs.nocotax.app/undisclosed-agents/refunds-and-cancellations.md).
* Record payments and payouts on the day they happen: the payment date is the date of recording.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.