LEDGERS icon

LEDGERS

Interact with LEDGERS API

Overview

This node facilitates the creation of purchase vouchers specifically for India-based accounting workflows. It supports three types of vouchers: Expense Voucher, Payment Voucher, and Salary Voucher. The node is designed to automate voucher creation by interacting with an external accounting API, streamlining bookkeeping tasks such as recording expenses, payments, and salary disbursements.

Common scenarios where this node is beneficial:

  • Automating expense tracking by creating expense vouchers with single or multiple account allocations.
  • Recording payment transactions through payment vouchers linked to contacts and payment methods.
  • Managing payroll by generating salary vouchers with detailed salary components for employees.

Practical examples:

  • A company wants to log monthly office expenses split across various accounts with applicable tax rates.
  • An organization needs to record a payment made to a vendor, including reconciliation details against purchase invoices.
  • HR department automates salary processing by creating salary vouchers specifying employee ID, salary month, and statutory deductions.

Properties

Name Meaning
Voucher Type Type of voucher to create. Options: Payment Voucher, Expense Voucher, Salary Voucher.
Branch ID Identifier of the branch where the voucher applies.
Payment Date Date of the payment (date only, no time).
Currency Currency code for the voucher amount. Supports a wide range of international currencies, e.g., INR (Indian Rupee), USD, EUR, etc.
Payment Method Name or ID Payment method used for the transaction. Selectable from a dynamically loaded list of payment methods relevant to purchases.

Expense Voucher Specific Properties (Voucher Type = Expense Voucher)

Name Meaning
Expense Type Whether the expense is allocated to a Single Account or Multiple Accounts.
Account Name or ID For single account expense type: the account to which the expense is charged. Loaded dynamically from chart of accounts.
Amount Total amount of the expense.
Tax Rate Applicable tax rate on the expense. Options include common GST rates like 0%, 5%, 12%, 18%, 28%, and special categories like Exempted Supply, Nil-Rated, etc.
Multiple Accounts For multiple accounts expense type: collection of accounts each with its own amount and tax rate.
Additional Fields Optional fields including Contact ID, Payment Status (Paid/Unpaid), Reverse Charge (Yes/No), and Claim ITC (Input Tax Credit) (Yes/No).

Payment Voucher Specific Properties (Voucher Type = Payment Voucher)

Name Meaning
Amount Amount paid in the payment voucher.
Contact ID Identifier of the contact (vendor/supplier) related to the payment.
Additional Fields Optional reconcile details allowing linking payment amounts to specific purchase invoice IDs.

Salary Voucher Specific Properties (Voucher Type = Salary Voucher)

Name Meaning
Employee ID Identifier of the employee for whom the salary voucher is created.
Account Name or ID Account associated with the salary payment, selectable from chart of accounts.
Salary Month/Year Month and year of the salary payment in MM-YYYY format.
Amount Total salary amount.
Salary Details Collection of optional salary components such as Employee State Insurance (ESI), Employer Provident Fund (PF), Professional Tax (PT), Tax Deducted at Source (TDS), Welfare Fund, etc.

Output

The node outputs JSON data representing the response from the external API after attempting to create the voucher. This typically includes:

  • Confirmation of voucher creation with voucher ID or reference.
  • Details of the created voucher such as type, amounts, dates, and linked entities.
  • Any error messages or status codes if the creation failed.

The output does not explicitly handle binary data; it focuses on structured JSON responses from the API.


Dependencies

  • Requires an API key credential and authentication token for the external accounting API.
  • Needs valid credentials including email, password, API URL, and API key configured in n8n.
  • Relies on dynamic loading of options for accounts, payment methods, employees, and branches via authenticated API calls.
  • Uses HTTP requests to interact with the external API endpoints for login, fetching metadata, and creating vouchers.

Troubleshooting

  • Authentication Failures: Errors indicating "Authentication failed" usually mean incorrect or expired API credentials. Verify API key, email, password, and API URL are correct and active.
  • Missing Required Fields: Ensure all required properties for the selected voucher type are provided, such as branch ID, amount, and account selections.
  • Invalid Date Format: The salary month/year must be in MM-YYYY format; incorrect formatting may cause errors.
  • API Response Errors: If the external API returns errors, check the error message for details. Common issues include invalid account IDs, unsupported currency codes, or mismatched payment methods.
  • Empty Option Lists: If dropdowns for accounts or payment methods do not populate, verify that the API credentials have sufficient permissions and that the API service is reachable.

Links and References

  • n8n Expressions Documentation — for using expressions in property values.
  • Indian GST Rates Reference — for understanding tax rate options.
  • External Accounting API documentation (not publicly linked here) — consult your API provider for detailed endpoint and data format specifications.

Discussion