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

# Journal Entries

> How Nmbr generates payroll journal entries and what the Journal Entry report contains.

For each payroll, Nmbr generates two payroll-level journal entries, plus a recording entry for each pay stub.

## 1) Payroll Recording (Accrual Entry)

* Recognises payroll **expenses** and corresponding **liabilities**.
* Ensures costs are recorded in the correct accounting period.
* **Debit:** Expense accounts (e.g. Wages Expense).
* **Credit:** Liability accounts (e.g. Payroll Payable, Tax Withheld Payable).

**Example (simplified):**

| Account              | Debit | Credit |
| -------------------- | ----- | ------ |
| Wages Expense        | 5,000 |        |
| Employer CPP Expense | 500   |        |
| Payroll Payable      |       | 5,500  |

## 2) Payroll Payment (Payment Entry)

* Reflects the actual **cash movement** when payroll and remittances are paid.
* **Debit:** Liability accounts (clearing what was accrued).
* **Credit:** Bank account.

**Example (simplified):**

| Account         | Debit | Credit |
| --------------- | ----- | ------ |
| Payroll Payable | 5,500 |        |
| Bank Account    |       | 5,500  |

## Pay stub recording entries

Alongside the two payroll-level entries, Nmbr generates a `pay_stub_recording` entry for each pay stub, holding the accrual detail for that single pay stub. These carry a `pay_stub` reference and are returned by the [Journal Entries API](/api-reference/journal-entries/list-journal-entries) with the payroll-level entries. Filter by `type` to narrow the list. Only the two payroll-level entries (`payroll_recording` and `payroll_payment`) are exported to the connected accounting platform.

## Tracking dimensions

When a line item is allocated across tags, each journal entry row carries the matched tags in its `dimension_1_tag`, `dimension_2_tag`, and `dimension_3_tag` fields, and the row is split per allocation. This breaks down payroll cost by department, project, or location. The tags are returned as stubs by default; resolve them with a nested expand such as `journal_entry_rows.dimension_1_tag`. See [Journal entry tracking dimensions](/guides/accounting/tagging#journal-entry-tracking-dimensions) and [Retrieving dimension tags](/guides/accounting/tagging#retrieving-dimension-tags) for the full model.

## Sample Journal Entry JSON

```json theme={null}
{
  "id": "<ulid>",
  "object": "journal_entry",
  "data": {
    "type": "payroll_recording",
    "title": "Payroll Accrual Entry",
    "payroll": {
      "id": "<ulid>",
      "object": "payroll",
      "links": {
        "self": "/payrolls/<ulid>"
      }
    },
    "pay_stub": null,
    "is_balanced": true,
    "total": 5403.62,
    "is_missing_line_item_accounting_codes": false,
    "is_missing_default_account_payable": false,
    "is_missing_default_bank_account": false,
    "posted_on": "2025-01-15T00:00:00.000000Z",
    "invalid_expense_types": [],
    "invalid_liability_types": [],
    "integrations": {
      "quickbooks": {
        "reference": null
      },
      "xero": {
        "reference": null
      }
    },
    "journal_entry_rows": {
      "object": "list",
      "data": [
        {
          "id": "<ulid>",
          "object": "journal_entry_row",
          "data": {
            "type": "debit",
            "amount": 5000,
            "code": "6000",
            "description": "Semi-Monthly Schedule #1 - Wages Expense",
            "account_code": {
              "id": "<ulid>",
              "object": "accounting_code",
              "links": {
                "self": "/accounting_codes/<ulid>"
              }
            },
            "dimension_1_tag": null,
            "dimension_2_tag": null,
            "dimension_3_tag": null,
            "created_at": "2025-01-01T00:00:00.000000Z",
            "updated_at": "2025-01-01T00:00:00.000000Z"
          },
          "links": {
            "self": null
          }
        },
        {
          "id": "<ulid>",
          "object": "journal_entry_row",
          "data": {
            "type": "debit",
            "amount": 403.62,
            "code": "6010",
            "description": "Semi-Monthly Schedule #1 - Employer Contributions Expense",
            "account_code": {
              "id": "<ulid>",
              "object": "accounting_code",
              "links": {
                "self": "/accounting_codes/<ulid>"
              }
            },
            "dimension_1_tag": null,
            "dimension_2_tag": null,
            "dimension_3_tag": null,
            "created_at": "2025-01-01T00:00:00.000000Z",
            "updated_at": "2025-01-01T00:00:00.000000Z"
          },
          "links": {
            "self": null
          }
        },
        {
          "id": "<ulid>",
          "object": "journal_entry_row",
          "data": {
            "type": "credit",
            "amount": 1930.24,
            "code": "2200",
            "description": "Semi-Monthly Schedule #1 - Statutory Withholdings Payable",
            "account_code": {
              "id": "<ulid>",
              "object": "accounting_code",
              "links": {
                "self": "/accounting_codes/<ulid>"
              }
            },
            "dimension_1_tag": null,
            "dimension_2_tag": null,
            "dimension_3_tag": null,
            "created_at": "2025-01-01T00:00:00.000000Z",
            "updated_at": "2025-01-01T00:00:00.000000Z"
          },
          "links": {
            "self": null
          }
        },
        {
          "id": "<ulid>",
          "object": "journal_entry_row",
          "data": {
            "type": "credit",
            "amount": 3473.38,
            "code": "2210",
            "description": "Semi-Monthly Schedule #1 - Net Pay Payable",
            "account_code": {
              "id": "<ulid>",
              "object": "accounting_code",
              "links": {
                "self": "/accounting_codes/<ulid>"
              }
            },
            "dimension_1_tag": null,
            "dimension_2_tag": null,
            "dimension_3_tag": null,
            "created_at": "2025-01-01T00:00:00.000000Z",
            "updated_at": "2025-01-01T00:00:00.000000Z"
          },
          "links": {
            "self": null
          }
        }
      ]
    },
    "created_at": "2025-01-01T00:00:00.000000Z",
    "updated_at": "2025-01-01T00:00:00.000000Z"
  },
  "links": {
    "self": "/journal_entries/<ulid>"
  }
}
```

> Journal entries can be retrieved via the [Journal Entries API](/api-reference/journal-entries/list-journal-entries).

## Validation flags

Before a journal entry can be exported it must be complete and balanced. Inspect these flags on the entry:

| Field                                   | Meaning                                               |
| --------------------------------------- | ----------------------------------------------------- |
| `is_balanced`                           | `false` if debits ≠ credits.                          |
| `is_missing_line_item_accounting_codes` | One or more line items lack codes.                    |
| `is_missing_default_account_payable`    | No default payroll payable code set.                  |
| `is_missing_default_bank_account`       | No default bank code set.                             |
| `invalid_expense_types`                 | List of `{ type, subtype }` missing an expense code.  |
| `invalid_liability_types`               | List of `{ type, subtype }` missing a liability code. |

To stop incomplete entries from reaching an approved payroll, enable `block_approval_on_incomplete_journal_entries` (or `block_approval_on_missing_export_identifiers`) on the Business Entity's `accounting_settings`.
