Skip to main content
Nmbr provides accounting features to help you manage payroll expenses and liabilities, configure accounting codes, and integrate seamlessly with third-party accounting platforms such as Xero and QuickBooks.
⚠️ Deprecation Notice
Nmbr previously supported a simplified GL Code entity. This has been deprecated in favour of the more flexible Accounting Code architecture.
All references to “GL Codes” in the API or docs should be considered deprecated and will be removed in a future release. Please migrate to Accounting Codes as soon as possible.

Accounting Codes

Accounting Codes are used to map payroll components (earnings, deductions, benefits, reimbursements, statutory withholdings) to the correct accounts in your Chart of Accounts. This ensures payroll entries are correctly represented as expenses, liabilities, or bank movements.

Accounting Code Properties

Accounting Codes are created at the Business Entity level and can be applied to:
  • Business Presets
  • Recurring Line Item Generators (e.g. Pay Rates, Deductions, Allowances, Benefits, Reimbursements)
  • Line Items (e.g. Earnings, Statutory Withholdings, Benefits)
Fields:
FieldRequiredDescription
business_entity_idyesThe Business Entity the accounting code belongs to.
titleyesHuman-friendly name of the accounting code.
typeyesOne of: expense, liability, or bank.
codeoptionalThe numeric/accounting code from your Chart of Accounts
fallback_mappingsoptionalA collection of {type, subtype} tuples used when no explicit code is set on a line item or recurrence.
descriptionoptionalDetailed description of the accounting code.

Inheritance & Fallbacks

When Nmbr generates accounting data:
  1. If a line item has its own accounting code, this is used.
  2. Else, inherit from its recurrence or business preset.
  3. Else, use any applicable fallback mapping.

This ensures journal entries are always valid, provided defaults are set.

Business Entity Defaults

Two default accounting codes must always be configured on each Business Entity:
FieldTypeDescription
default_bank_accounting_code_idbankThe bank account used for payroll payments.
default_payroll_payable_accounting_code_idliabilityThe liability account used for accrued wages and deductions.
Without these defaults, journal entries cannot be generated or exported.

Fallback Accounting Codes

Fallback mappings provide a default routing for payroll items that don’t have a specific accounting code assigned. By defining { type, subtype } pairs, you can ensure that all line items are captured in journal entries, even if no explicit mapping exists. More specific codes always take precedence over fallbacks. Fallback mappings can be defined for any type and subtype pair - including statutory_withholding and employer_statutory_withholding.

Example: Benefits Payable

curl --request POST \
     --url 'https://sandbox.nmbr.co/services/payroll/accounting_codes' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer <access_token>' \
     --data '{
         "business_entity_id": "<business_entity_id>",
         "title": "Benefits Payable",
         "description": "Default liability accounting code for health/dental benefits",
         "type": "liability",
         "code": "2240",
         "fallback_mappings": [
             { "type": "employee_benefit", "subtype": "health" },
             { "type": "employer_benefit", "subtype": "health" },
             { "type": "employee_benefit", "subtype": "dental" },
             { "type": "employer_benefit", "subtype": "dental" }
         ]
     }'
In this example, any health or dental benefit without a specific liability code will fall back to 2240 – Benefits Payable.

Journal Entries

Nmbr generates two journal entries per payroll:

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):
AccountDebitCredit
Wages Expense5,000
Employer CPP Expense500
Payroll Payable5,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):
AccountDebitCredit
Payroll Payable5,500
Bank Account5,500

Sample Journal Entry JSON

{
  "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": "4985",
            "description": "Semi-Monthly Schedule #1 - Ad possimus sed accusamus.",
            "journal_entry": {
              "id": "<ulid>",
              "object": "journal_entry",
              "links": {
                "self": "/journal_entries/<ulid>"
              }
            },
            "account_code": {
              "id": "<ulid>",
              "object": "accounting_code",
              "links": {
                "self": "/accounting_codes/<ulid>"
              }
            },
            "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": "1678",
            "description": "Semi-Monthly Schedule #1 - Animi eos.",
            "journal_entry": {
              "id": "<ulid>",
              "object": "journal_entry",
              "links": {
                "self": "/journal_entries/<ulid>"
              }
            },
            "account_code": {
              "id": "<ulid>",
              "object": "accounting_code",
              "links": {
                "self": "/accounting_codes/<ulid>"
              }
            },
            "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": "9676",
            "description": "Semi-Monthly Schedule #1 - Expedita exercitationem ducimus quia.",
            "journal_entry": {
              "id": "<ulid>",
              "object": "journal_entry",
              "links": {
                "self": "/journal_entries/<ulid>"
              }
            },
            "account_code": {
              "id": "<ulid>",
              "object": "accounting_code",
              "links": {
                "self": "/accounting_codes/<ulid>"
              }
            },
            "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": "2356",
            "description": "Semi-Monthly Schedule #1 - Excepturi impedit mollitia.",
            "journal_entry": {
              "id": "<ulid>",
              "object": "journal_entry",
              "links": {
                "self": "/journal_entries/<ulid>"
              }
            },
            "account_code": {
              "id": "<ulid>",
              "object": "accounting_code",
              "links": {
                "self": "/accounting_codes/<ulid>"
              }
            },
            "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.

Accounting Integrations

Nmbr integrates with Xero and QuickBooks Online via OAuth 2.0. This lets you import your Chart of Accounts and export payroll journal entries automatically.

Xero Integration

To set up a Xero integration, you will need to 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 You can create a Demo company in Xero to test the integration.

QuickBooks Integration

To set up a QuickBooks integration, you will need to 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 You can create a Demo company in QuickBooks to test the integration. When creating a testing application, please ensure you select the “Sandbox” environment in Quickbooks.

Setup Overview

  1. Register an OAuth 2.0 application in your accounting platform.
  2. Configure the redirect URI:
    https://uni-api.nmbr.co/oauth/code
    
  3. Add your client ID/secret in the Nmbr portal.
  4. Connect your accounting platform via the Nmbr UI.
  5. Sync accounts and export journals.

Syncing Accounting Codes

After a client has connected their accounting platform, you can import their Chart of Accounts into their Nmbr Business Entity:
curl --request POST
     --url 'https://sandbox.nmbr.co/services/payroll/integrations/xero/sync'
     --header 'Authorization: Bearer <access_token>'
     --data '{
       "business_entity_id": "<business_entity_id>",
       "sync": "accounting_codes"
     }'
Imported accounts are limited to liability, expense, and bank types.

Exporting Journal Entries

To export a journal entry for a payroll, use the following request:
curl --request POST
     --url 'https://sandbox.nmbr.co/services/payroll/integrations/xero/sync'
     --header 'Authorization: Bearer <access_token>'
     --data '{
       "payroll_id": "<payroll_id>",
       "sync": "journal_entries"
     }'
Validation requirements:
  • All line items must have valid accounting codes.
  • The Business Entity must have default Bank and Payroll Payable codes set.

Error Handling

If an export fails, inspect the journal entry’s validation flags:
FieldMeaning
is_balancedfalse if debits ≠ credits.
is_missing_line_item_accounting_codesOne or more line items lack codes.
is_missing_default_account_payableNo default liability (Payroll Payable) set.
is_missing_default_bank_accountNo default bank account set.
invalid_expense_typesList of { type, subtype } missing an expense code.
invalid_liability_typesList of { type, subtype } missing a liability code.

Quickstart: Payroll → Accounting

  1. Configure Accounting Codes
    Set up expense, liability, and bank accounts; define Business Entity defaults.
  2. Connect Accounting Platform
    OAuth into Xero or QuickBooks; sync your Chart of Accounts.
  3. Export Journals
    Approve payroll in Nmbr; export accrual and payment journal entries.