Accounting Codes
Accounting Codes map payroll components to accounts in the business entity’s Chart of Accounts, so each payroll entry is recorded as an expense, a liability, or a bank movement. Accounting Codes are created at the Business Entity level. Fields:
See the Accounting Codes API reference for full details.
Merging accounting codes
Duplicate codes can accumulate, often after importing a Chart of Accounts. Send the codes to absorb toPOST /accounting_codes/{id}/merge to merge them into one; their references are reassigned to the target code and the duplicates are removed. All codes in a merge must share the same type and Business Entity.
Routing line items to accounts
Accounting Code Rules decide which expense and liability codes a line item receives. A rule is defined on a Business Entity and assigns anexpense_accounting_code and a liability_accounting_code to the line items it matches.
A rule matches on any combination of:
type(e.g.earning,deduction), optionally narrowed bysubtype(e.g.salary,wage)business_preset_id, the highest-specificity match, mutually exclusive withtype/subtype- a tag, for tag-scoped routing (covered in the Tagging guide)
Example: route all salary earnings
Rule precedence
The expense and liability codes are resolved independently. A single line item can take its expense code from one rule and its liability code from another, and a more specific rule can supply one side while a broader rule supplies the other. Within global rules, more specific rules win:business_preset_idtype+subtypetype
Rules are re-evaluated whenever a draft payroll is recalculated, so rule changes take effect on the next calculation. Approved payrolls keep the codes they resolved at approval time.
Business Entity accounting settings
Each Business Entity carries anaccounting_settings object that holds its accounting configuration. Read and write these through accounting_settings. The matching top-level fields (default_bank_accounting_code, default_payroll_payable_accounting_code, primary_tag_group, resolve_journal_entry_stat_withholdings) are retained as deprecated aliases.
Set the defaults by updating the Business Entity:
Journal Entries
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).
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.
Pay stub recording entries
Alongside the two payroll-level entries, Nmbr generates apay_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 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 itsdimension_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 and Retrieving dimension tags for the full model.
Sample Journal Entry JSON
Journal entries can be retrieved via the Journal Entries API.
Validation flags
Before a journal entry can be exported it must be complete and balanced. Inspect these flags on the entry:
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.
Accounting Integrations
Nmbr integrates with Xero and QuickBooks Online via OAuth 2.0. This imports a business entity’s Chart of Accounts and tracking dimensions, and exports payroll journal entries automatically.Xero Integration
To set up a Xero integration, register for a Xero developer account and create an OAuth 2.0 application. Configure the redirect URI to:https://uni-api.nmbr.co/oauth/code
Create a Demo company in Xero to test the integration.
QuickBooks Integration
To set up a QuickBooks integration, register for a QuickBooks developer account and create an OAuth 2.0 application. Configure the redirect URI to:https://uni-api.nmbr.co/oauth/code
Create a Demo company in QuickBooks to test the integration. When creating a testing application, select the “Sandbox” environment in QuickBooks.
Setup Overview
- Register an OAuth 2.0 application with the accounting platform.
- Configure the redirect URI:
- Add the client ID/secret in the Nmbr Portal.
- Connect the accounting platform in the Nmbr Portal.
- Sync accounts and tracking dimensions, then export journals.
Syncing accounting codes
After a client connects their accounting platform, import their Chart of Accounts into their Nmbr Business Entity:liability, expense, and bank types.
Syncing tracking dimensions
Accounting platforms also expose tracking dimensions (Xero tracking categories, QuickBooks classes, departments, and projects). Import them with thecategory, department, or project sync types. Each imported dimension becomes a Tag Group, and its values become Tags, ready to use for tag allocation.
GET /integrations/{integration}/tracking_dimensions.
Exporting journal entries
To export a payroll’s journal entries:- All line items must have valid accounting codes.
- The Business Entity must have default bank and payroll payable codes set.
Deprecations
⚠️ GL Codes Nmbr previously supported a simplified GL Code entity, deprecated in favour of Accounting Codes. References to “GL Codes” in the API or docs are deprecated and will be removed in a future release.
⚠️ Fallback mappings Accounting Codes previously carriedfallback_mappings, a collection of{ type, subtype }tuples used to route line items with no explicit code. This is deprecated in favour of global Accounting Code Rules, which cover the same routing and more. Thefallback_mappingsfield still reads and writes for backwards compatibility.
Quickstart: Payroll → Accounting
-
Configure Accounting Codes
Set up expense, liability, and bank accounts; set the Business Entity’s default bank and payroll payable codes in
accounting_settings. - Define Accounting Code Rules Route line items to expense and liability codes by type, subtype, preset, or tag.
- Connect Accounting Platform OAuth into Xero or QuickBooks; sync the Chart of Accounts and tracking dimensions.
- Export Journals Approve payroll in Nmbr; export the accrual and payment journal entries.

