Jay GajjarSenior Software Engineer

Business software: CRM, ERP and billing

Tally API integration for your website, CRM and ERP

I build Tally API integration for businesses whose orders, invoices or stock live in a website, CRM or ERP, while the books stay in TallyPrime or Tally.ERP 9. The aim: entries reach your accountant's Tally without retyping, every posting is logged, and nothing is ever posted twice. I have worked on a production system that talks to Tally through a middleware application on the Tally side, and I treat the accounting side the way I treat invoice numbers: checked before it is saved, and safe to run again if something fails halfway.

ContactHire on Fiverr (opens in a new tab)Available for new projects. I reply within an hour during working hours.

What’s included

  • A connection plan for where your Tally runs: an office PC, a local server or a hosted copy
  • Masters sync: party ledgers, sales and tax ledgers, stock items, units and godowns, mapped to your records
  • Voucher posting for sales, purchases, receipts, payments, credit notes and debit notes
  • A small connector on the Tally side when your web app cannot reach Tally directly
  • Staging tables, a sync log and retries, so a failed post never leaves half-written data
  • Duplicate protection: each source record reaches Tally once, however often the sync runs
  • A screen for failed or held entries, so your accountant can fix a mapping and resend

What a Tally integration does, and who it is for

Many Indian businesses keep their accounts in Tally and run everything else elsewhere: a website taking orders, a CRM raising invoices, an ERP handling purchasing and stock. Without an integration, someone types those entries into Tally again. An integration lets your software send them to Tally directly, and read back what it needs, such as balances or stock.

It suits businesses whose transactions already live in a system of their own: a custom ERP, a GST billing system, an inventory tool or an online store.

It is not always worth building. If your sales run on a popular platform, ready-made Tally integration software may already connect it, and buying a connector is cheaper than a custom build. At a handful of invoices a week, a periodic file import may be enough. And if what you need is a new screen or report inside Tally itself, that is TDL work, which a Tally partner does best; I work on the integration side and can work alongside them.

How Tally's integration interface works

TallyPrime, and Tally.ERP 9 before it, can act as a server on the machine where it runs, on a port you set in its configuration (commonly 9000). Other software sends XML requests over HTTP to export masters, vouchers or reports, or to import data that creates or alters ledgers, stock items and vouchers. Newer TallyPrime releases also accept JSON, and ODBC suits reading data into reports. Tally has to be running with the right company loaded. This is what people usually mean by Tally Prime API integration.

The catch is where Tally lives: usually on an office PC, while your web application runs on a cloud server that cannot reach it. That port should never be opened to the internet, because it was designed for a trusted network. So the real question is how the two sides meet:

  • A connector or middleware on the Tally side. A small program on the Tally machine fetches pending entries from your web app over HTTPS, posts them to Tally locally and reports back. Nothing is exposed. On a previous project I worked with exactly this kind of setup: a middleware application watched the requests arriving on a set port and passed each one on to the address configured in it. I did not build that middleware, but I know how the pieces fit and where they fail.
  • A secure tunnel or VPN between your server and the Tally machine.
  • Same network. An application on a server in the same office can talk to Tally directly.
  • Hosted Tally. If Tally runs on a remote server, the connector runs there.

What gets synced, and which system is the source of record

Masters are the lists vouchers depend on: party ledgers, sales and purchase ledgers, the CGST, SGST and IGST ledgers, stock items with units and godowns. Vouchers are the transactions: sales, purchases, receipts, payments, journals, credit and debit notes. A voucher naming a ledger Tally does not have will fail, so mapping masters comes first.

Mapping is where most of the thinking goes. Each customer in your app must point to exactly one Tally ledger, and each tax rate to the right sales and GST ledgers. Existing Tally data often has duplicates, such as ABC Traders and A.B.C. Traders, and we settle those before the first sync.

Then we agree, per type of data, which system is the source of record:

  • Tally usually owns accounts: the chart of ledgers, opening balances, adjustments and anything your accountant posts by hand.
  • Your app usually owns operations: orders, quotations, dispatch and the invoices it raises, which are pushed to Tally one way.
  • Two-way sync is useful for reading payments, outstanding bills or stock back from Tally into your app.
  • Editing the same record in both places is where conflicts come from, so I design it out: each record has one owner, and the other system only receives it.

Staged, logged and never posted twice

A voucher posted twice is worse than one not posted at all, because it quietly inflates sales or stock. So nothing goes straight from a button click to Tally. Each entry is written to a staging table with a status (pending, posted, failed or held), and a queued job sends it. The job checks whether that source record already reached Tally, then stores Tally's response and a reference tying the voucher to your record. Running the sync again only sends what is still pending.

Failures are handled by cause. If Tally is closed or the connection drops, the job retries later on its own. If Tally rejects the entry, say for a missing ledger, retrying will not help, so the entry is held with the exact error for someone to fix and resend. A daily reconciliation compares counts and totals in your app against Tally, so a gap shows up in a report, not at year end.

I built the same pattern, staging tables, entity mapping, configurable behaviour and a log of every call, for a sync with a separate accounting system on the AI invoice capture project. Amounts are kept as fixed decimals throughout, so totals in your app, in the PDF and in Tally match to the paisa.

Tally integration with website orders, stock and e-invoices

Tally integration with website orders is a common first project: each paid order becomes a sales voucher, against the customer's ledger or a single online-sales ledger if your accountant prefers, and stock is read back from Tally on a schedule. The order number travels with the voucher, so any entry can be traced back to its order.

When a client asks for Tally API integration for e invoice generation, the first question is where the invoice is raised. If your own software raises it, the IRN and QR code can come from the government's invoice registration portal through a GST Suvidha Provider's API, and the voucher then goes to Tally with the invoice reference. If invoices are raised in Tally, recent TallyPrime releases have e-invoicing built in, and the integration should leave that step to Tally. Either way, generate each e-invoice once, in one place. Purchase bills can start upstream, with AI invoice processing reading supplier invoices for a person to confirm.

What affects Tally API integration cost

I do not publish prices, because two integrations that sound alike can differ by weeks of work. After a call and a look at both systems, I send a fixed quote. The main drivers are:

  • Where Tally runs and how your app will reach it: same network, connector, tunnel or hosted copy
  • How many voucher types and masters are involved, and whether inventory is tracked in Tally
  • One-way posting, or two-way with balances, payments or stock read back
  • The state of your existing ledgers: duplicates and inconsistent names must be cleaned up first
  • Several companies or branches, and whether they run on one Tally or several
  • Whether your own software needs building or changing, through API development or a new module

How the work runs

  1. Look at both sides

    I review your Tally setup (version, companies, ledgers, voucher types) and your software, and agree what must flow and how often.

  2. Agree mapping and ownership

    We write down which record maps to which ledger or stock item, which system owns each kind of data, and what happens to entries Tally rejects.

  3. Build against a test company

    Everything is tested against a copy of your company data, never your live books, including failures such as Tally closing mid-sync.

  4. Run in parallel and reconcile

    For an agreed period your accountant checks synced entries against what they would have posted by hand, and we fix every mismatch.

  5. Go live and monitor

    The sync goes live with alerts on failed and held entries, plus notes on resending an entry. Bugs in my work are fixed free for 30 days.

Tools and technologies

  • TallyPrime
  • Tally.ERP 9
  • Tally XML over HTTP
  • ODBC
  • PHP 8
  • Laravel
  • CodeIgniter 3
  • MySQL
  • Queues and scheduler
  • REST APIs and webhooks

About past work

Client work for this service is private, so it is not shown here. On a call I can walk you through comparable projects, what was done and how it turned out. The case studies show how I approach engineering problems in general.

Questions

  • Does Tally have an API?

    Not a cloud API in the usual sense. TallyPrime and Tally.ERP 9 can act as a server on the machine where they run, accepting XML requests over HTTP on a configured port (newer TallyPrime releases also accept JSON), plus ODBC for reading data.

  • Can a cloud web app connect to Tally on my office PC?

    Yes, but not by opening a port to the internet. The usual route is a small connector on the Tally machine that fetches pending entries from your app over HTTPS and posts them locally. A VPN or secure tunnel is the alternative.

  • Does Tally ERP 9 API integration work the same way as TallyPrime?

    Broadly, yes. Both use the same XML interface, but details differ by release, so I test on the exact version you run. If you plan to move to TallyPrime soon, do that before the integration rather than after.

  • How do you stop the same voucher being posted twice?

    Every entry goes through a staging table, and the sync checks whether that source record already reached Tally before posting it. Retrying after a failure only sends what is still pending.

  • Do I need to change anything in Tally?

    Usually only small things: switching on the server option and port, keeping Tally running with the company loaded while the sync runs, and agreeing the ledgers entries post to. Your accountant keeps working as before.

  • Can you build Tally Prime integration for two-way sync?

    Yes, for the right data. Pushing invoices and receipts from your app and reading balances, outstanding bills or stock back from Tally works well. Letting both systems edit the same record causes conflicts, so each kind of data gets one owner.

  • Do you write TDL customizations inside Tally?

    My work is on the integration side: your web application, the connector and the data exchange. For new screens or reports inside Tally itself, a Tally partner who writes TDL is the right person, and I am happy to work with yours.

  • How much does Tally API integration cost?

    It depends on how your app reaches Tally, how many voucher types and masters are involved, one-way or two-way sync, and how clean your existing ledgers are. I send a fixed quote after a call and a look at both systems. If a ready-made connector fits, I will tell you.

Tell me what you are building.

A few lines about the project, who will use it and when it needs to ship are enough to start. You get a straight answer on whether tally integration is the right fit, and what it would take.

Status
Available for new projects
Reply time
I reply within an hour during working hours.
Working hours
9 AM to 9 PM IST (UTC+5:30)
Languages
English, Hindi, Gujarati

How pricing, payments and terms work

Prefer email? Write to jaygajjar.dev@gmail.com.