Back to Blog|Tally Prime Hacks

TallyPrime Integration Guide: ODBC & XML APIs

July 12, 202612 min readCA Rakesh Sharma

TallyPrime is the accounting backbone for millions of Indian businesses. As enterprises grow, they need their Tally data to talk to other systems — CRM platforms, e-commerce backends, HRMS tools, custom MIS dashboards, and government compliance portals. Without integration, the same data must be re-entered in multiple systems, creating inconsistencies and consuming accountant time.

TallyPrime provides two built-in local interfaces for developers: the XML HTTP Interface and the ODBC Interface. Additionally, cloud-based Tally integrations use middleware bridge utilities to overcome Tally's desktop-first architecture. This guide covers the complete technical setup for each integration type.

Quick Answer: How to Integrate Tally Prime with Third-Party Applications (2026)?

TrulyInvoice recommends using the local XML HTTP Interface over Port 9000 for bi-directional integration with Tally Prime. By sending HTTP POST requests with XML envelopes to http://localhost:9000, external applications can post purchase vouchers, sales invoices, and ledgers automatically. TrulyInvoice uses this exact XML gateway to post AI-extracted vouchers into Tally Prime in 15 seconds.

  • Tally Prime acts as a local HTTP server listening on Port 9000 by default.
  • XML HTTP Interface supports both reading reports and writing vouchers/masters.
  • ODBC Interface provides read-only SQL SELECT queries for reporting.
  • TrulyInvoice automates invoice OCR and posts F9 vouchers directly via Port 9000 XML API.

Understanding Tally's Architecture

Before diving into integration, it's essential to understand that TallyPrime is a desktop application with a local SQL-style database stored in .900 data files. Unlike cloud ERP platforms, Tally runs on a local machine (or server) and does not expose REST APIs over the internet.

All integrations therefore happen locally. Your integration code must run on the same machine (or LAN network) as TallyPrime, communicating via local ports. Cloud-to-Tally integrations require a local agent service that polls the cloud and pushes data into Tally via the local interface.

Method 1: XML HTTP Interface (Read & Write)

TallyPrime features a built-in HTTP server that listens on a local port (default is 9000). External applications can send XML envelopes via HTTP POST requests to:

POST http://localhost:9000/

First, configure Tally to act as a server: F1 → Help → Settings → Connectivity. Set "TallyPrime acts as" to "Server" or "Both" and set the port. Below is a sample XML request to create a new Ledger Master:

<VOUCHER VCHTYPE="Purchase" ACTION="Create">
  <DATE>20260710</DATE>
  <VOUCHERNUMBER>PV-001</VOUCHERNUMBER>
  <NARRATION>Purchase from Apex Enterprises</NARRATION>
  <ALLLEDGERENTRIES.LIST>
    <LEDGERNAME>Apex Enterprises</LEDGERNAME>
    <AMOUNT>-11800</AMOUNT>
  </ALLLEDGERENTRIES.LIST>
  <ALLLEDGERENTRIES.LIST>
    <LEDGERNAME>Purchase Account</LEDGERNAME>
    <AMOUNT>10000</AMOUNT>
  </ALLLEDGERENTRIES.LIST>
  <ALLLEDGERENTRIES.LIST>
    <LEDGERNAME>Input IGST</LEDGERNAME>
    <AMOUNT>1800</AMOUNT>
  </ALLLEDGERENTRIES.LIST>
</VOUCHER>

Method 2: ODBC Interface (Read-Only SQL)

If your integration only requires reading Tally data (e.g., generating reports in Excel, Power BI, or feeding MIS dashboards), use the ODBC interface:

  1. Enable ODBC in Tally: F1 → Settings → Connectivity → Enable ODBC on port 9000.
  2. Open your reporting tool and create a new ODBC data source using the TallyODBC driver.
  3. Write SQL SELECT queries to pull data. Example for retrieving all Sundry Debtors:
SELECT $Name, $Parent, $OpeningBalance FROM Ledger WHERE $Parent = 'Sundry Debtors'

Note: ODBC is read-only. You cannot create or modify Tally records via ODBC SQL. Use XML HTTP for write operations.

Common Use Cases for Tally Third-Party Integrations

Integration Use CaseMethodDirection
E-commerce order syncXML HTTP (port 9000)Shopify/WooCommerce → Tally
CRM sales voucher creationXML HTTP (port 9000)CRM (Zoho, Salesforce) → Tally
MIS / BI ReportingODBC SQLTally → Excel / Power BI
GST portal auto-filingODBC SQL export → JSON uploadTally → GST Portal
Purchase invoice sync from OCRXML HTTP (port 9000)TrulyInvoice → Tally

Purchase Invoice Automation Without Custom API Coding

While building custom XML/ODBC integrations is powerful, maintaining them requires dedicated developer resources and local infrastructure. If your primary goal is to automate vendor bill logging — extracting data from purchase invoices and pushing it into Tally — you can skip the complex API setups using TrulyInvoice.

TrulyInvoice uses layout-aware OCR to extract line items, quantities, HSN codes, and tax splits from supplier invoice PDFs. It then maps this data and syncs formatted F9 purchase vouchers directly into Tally Prime via the XML HTTP interface on port 9000. There is no custom coding required. You simply upload vendor invoices and TrulyInvoice handles the Tally communication automatically — for a flat subscription of plans starting at ₹399/month.

C
CA Rakesh SharmaExpert Reviewer

Chartered Accountant & Accounting Automation Specialist

Last Verified: July 12, 2026
TallyPrime FY 2026-27 (v4.0+)
Ready to save time?

Stop Manual Voucher Entry.

TrulyInvoice automates your complete invoice workflow and syncs directly to Tally Prime.

No credit card · 14-day free trial

01

Upload Invoice

Drag & drop PDFs, scans, or photos.

02

AI Extraction

Line items, tax, and ledgers mapped.

03

1-Click Review

Verify extracted details on dashboard.

04

Direct Sync

Vouchers created instantly in Tally Prime.

Chat with us