Tally Prime is the backbone of accounting for millions of businesses. It's reliable, fast, and handles complex Indian accounting requirements natively. But it was designed as a desktop application, and integrating it with modern workflows — automated reconciliation, real-time compliance checking, payment automation — requires understanding how Tally communicates with the outside world.
This guide covers everything you need to know about automating Tally Prime.
How Tally Prime Communicates
Tally Prime exposes an HTTP server that accepts XML requests and returns XML responses. This isn't a REST API in the modern sense — there are no JSON endpoints, no OAuth tokens, no API keys. It's a simple request-response protocol over HTTP.
By default, Tally listens on port 9000 on the machine it's running on. To enable it:
- Open Tally Prime
- Press F12 (Configuration)
- Go to "Data Configuration"
- Set "Allow ODBC Connectivity" to Yes
- Note the port number (default: 9000)
Once enabled, any machine on your local network can send XML requests to Tally and receive structured data back.
What Data Can You Extract?
Tally's XML interface exposes virtually everything in your company file:
Ledger Data
Every account in your chart of accounts — its name, group, opening balance, current balance, and all transactions. This is the foundation for reconciliation and audit workflows.
Voucher Data
Every transaction recorded in Tally — sales vouchers, purchase vouchers, receipt vouchers, payment vouchers, contra entries, and journal entries. Each voucher includes party name, amount, tax details, narration, and date.
Stock Items
Inventory records including item names, quantities, rates, and group classifications. Useful for matching against purchase invoices.
Trial Balance
The complete trial balance as of any date. This is essential for nightly audit workflows — you can programmatically verify that debits equal credits.
Outstanding Bills
Receivables and payables aging data. Which invoices are outstanding, for how long, and for how much. Critical for cash flow management and collection workflows.
The XML Request Format
Every request to Tally follows the same pattern — an XML envelope containing a collection request that specifies what data you want. For example, to get all ledger names:
<ENVELOPE>
<HEADER>
<TALLYREQUEST>Export Data</TALLYREQUEST>
</HEADER>
<BODY>
<EXPORTDATA>
<REQUESTDESC>
<REPORTNAME>List of Ledgers</REPORTNAME>
<STATICVARIABLES>
<SVCURRENTCOMPANY>Your Company Name</SVCURRENTCOMPANY>
</STATICVARIABLES>
</REQUESTDESC>
</EXPORTDATA>
</BODY>
</ENVELOPE>
The response is also XML, containing the requested data in Tally's internal format. Parsing this requires an XML parser (like xml2js in Node.js) and knowledge of Tally's data structure.
Common Automation Use Cases
1. GST Reconciliation
The most common automation built on Tally's API is GST reconciliation. The workflow:
- Extract all purchase vouchers from Tally for the month
- Download GSTR-2B from the GST portal
- Match invoices by GSTIN, invoice number, and amount
- Flag mismatches for human review
This eliminates the manual Excel cross-referencing that most finance teams do today.
2. Nightly Financial Audit
Run automated checks against your Tally data every night:
- Does the trial balance tally? (debits = credits)
- Are there any unusually large transactions?
- Are all bank accounts reconciled?
- Are there any invoices older than 90 days without follow-up?
3. Payment File Generation
Extract outstanding payables from Tally, validate against invoices, and generate bank CMS files (HDFC, Kotak format) for bulk payments. This eliminates manual data entry into net banking portals.
4. TDS Return Preparation
Extract vouchers with TDS deductions, categorize by section (194C, 194J, etc.), and prepare Form 26Q data in the format required by the TRACES portal.
Challenges with Tally Automation
No Authentication
Tally's HTTP interface has no built-in authentication. Anyone on your local network with access to port 9000 can read your financial data. This is a security consideration — make sure your network is properly segmented.
XML Parsing Complexity
Tally's XML format is verbose and deeply nested. A single voucher response can contain hundreds of lines of XML. You need robust parsing logic to extract the data you need reliably.
Company File Locking
Tally locks the company file when it's open. If multiple tools try to access Tally simultaneously, you may encounter lock conflicts. Design your automation to make short, focused requests rather than long-running connections.
Version Differences
While the XML protocol is generally stable across Tally versions, field names and structures can differ between Tally ERP 9 and Tally Prime. Test your automation against the specific version you're running.
How Fintroller Handles Tally Integration
Fintroller abstracts away the complexity of Tally's XML interface. You configure your Tally host, port, and company name — and Fintroller handles everything else:
- XML request construction — Fintroller knows Tally's XML schema and constructs the right requests for each data type
- Response parsing — Robust XML parsing with error handling for malformed responses
- Data normalization — Tally data is normalized into a standard format that can be compared against other sources (GST portal, bank statements)
- Incremental sync — Only fetches data that's changed since the last sync, minimizing load on Tally
- Local execution — Runs on your machine, communicates with Tally over your LAN. Zero cloud involvement.
Getting Started
If you want to start automating Tally Prime today:
- Enable the HTTP server in Tally Prime (F12 → Data Configuration → ODBC)
- Test connectivity — try accessing
http://localhost:9000in your browser. You should get an XML response. - Start with read-only operations — extract ledger lists and trial balance first. These are low-risk and help you understand the XML format.
- Use a proper XML parser — don't try to parse Tally XML with regex. Use xml2js (Node.js), lxml (Python), or similar libraries.
Or, if you'd rather skip the development work, join the Fintroller waitlist. We've already built the Tally integration — you just point it at your Tally instance and go.