ml-connector
TallyPrimeToast

TallyPrime and Toast integration

Toast runs your restaurant POS, orders, and labor. TallyPrime runs your accounting and GL. Keeping them connected means your daily POS sales post into TallyPrime as revenue ledger entries without manual re-keying, your payments are recorded against the right cash and receivable accounts, and your GL closes each day with your POS revenue already posted. ml-connector handles the local connection to TallyPrime's port 9000, manages Toast's OAuth credentials, and runs the daily sync on a schedule you choose.

How TallyPrime works

TallyPrime is a Windows desktop accounting application that exposes ledgers, groups, vouchers (purchase, sales, payment, receipt, and purchase orders), and stock items through an HTTP server on port 9000. All operations are controlled by XML request envelopes sent via POST to http://<tally-host-ip>:9000, with Import Data for writes and Export Data for reads. Authentication is optional at the transport layer but can include username and password if the company is password-protected. TallyPrime has no native webhooks or event system, so data is retrieved by polling with date range filters. The application must be running with the target company open, and a local agent is required to bridge cloud connectors to the local port 9000 because the server is LAN-accessible only.

How Toast works

Toast is a cloud restaurant management platform that exposes sales orders, checks, payments, employees, shifts, menu items, and revenue categories through REST APIs at https://ws-api.toasttab.com. Every request requires OAuth 2.0 bearer token authentication and includes the Toast-Restaurant-External-ID header to specify which location. Toast supports both webhooks and polling: webhooks push events for orders and menu changes, while payments and labor data require polling. The reconciliation pattern is to poll each business date via GET /ordersBulk with YYYYMMDD date, filtered to account for each restaurant's configurable closeout hour. Write operations are limited to employees and some order updates, while menu and configuration data are read-only.

What moves between them

Sales and payment records flow from Toast into TallyPrime daily. ml-connector polls Toast for orders and payments created on each business date, maps Toast revenue and payment types to TallyPrime ledger groups, and creates sales vouchers and receipt vouchers in TallyPrime at end of day. Toast service charges and discounts are recorded as separate line items. Voided orders and payments are filtered out before posting. Multi-location Toast restaurants require separate syncs per location, with each location's sales and payments recorded in the same TallyPrime company but tagged by location code for reporting.

How ml-connector handles it

ml-connector runs as a scheduled job that fires once per day after your restaurant's close-of-business time, accounting for Toast's configurable closeout hour. It authenticates to Toast via OAuth 2.0, caches the bearer token to avoid rate limit hits, and polls GET /ordersBulk for the business date just completed. Each order is checked for voided status and fundraising items are excluded. Revenue is summed by category, service charges and discounts are extracted, and the full set is mapped to TallyPrime ledger names and groups - usually Sales Revenue, Discounts, Service Charges, and Cash or Accounts Receivable. ml-connector then connects to the local TallyPrime instance on port 9000, validates that the target company is open and the application is running, and posts a single daily sales entry and a receipt entry via XML Import Data envelopes. If the TallyPrime instance is unavailable, ml-connector retries the next day. Because TallyPrime has no native idempotency, ml-connector tracks the date of the last successful post so duplicate syncs do not create duplicate vouchers. Toast business date is validated against the configured closeout hour before posting so sales are recorded on the correct accounting date.

A real-world example

A multi-unit restaurant group operates 4 Toast POS locations across three cities and runs TallyPrime for consolidated accounting and GST filing on their shared company instance. Before the integration, each location manager exported a daily sales report from Toast by email, and the accountant manually entered total sales, taxes, and discounts into TallyPrime as a single daily voucher, then had to reconcile voided orders and refunds by hand. Month-end close required pulling detailed transaction reports from each location to explain sales variance. With Toast and TallyPrime connected, each location's sales post daily as mapped revenue vouchers with service charges and discounts as separate line items. The accountant logs in to see the GL updated each morning, can drill down by location code to audit individual day's postings, and month-end close begins with revenue accounts already reconciled and detailed daily transaction data automatically captured.

What you can do

  • Post daily sales totals from Toast into TallyPrime as sales vouchers, split by revenue category and location.
  • Record Toast payments (cash and card) as receipt vouchers in TallyPrime, mapped to the correct cash and receivable accounts.
  • Filter voided orders and fundraising items before posting so only settled sales reach your GL.
  • Authenticate Toast via OAuth 2.0, cache bearer tokens to avoid rate limits, and handle Toast's multi-location requirement.
  • Respect Toast's business date rules based on each restaurant's closeout hour, so POS sales post on the correct accounting date.

Questions

How does ml-connector handle the local connection to TallyPrime on port 9000?
ml-connector includes a local agent that runs on the same machine or LAN segment as your TallyPrime instance. The agent bridges cloud requests to the local HTTP port 9000, validates that the TallyPrime application is running and the target company is open, and posts XML Import Data envelopes to create sales and receipt vouchers. If the instance becomes unavailable, the connector retries the next day.
What happens if a Toast order is voided or refunded?
ml-connector polls Toast's voided flag on every order and excludes voided orders and their line items before summing revenue. Refunded payments are also excluded from the daily sales total. This ensures your TallyPrime GL records only settled sales and payments.
How are multi-location Toast restaurants handled in a single TallyPrime company?
ml-connector performs a separate daily sync for each Toast location, mapping each location's sales and payments into the same TallyPrime company but tagging them with a location code or prefix so your GL can split revenue by store. You configure the location mapping once and ml-connector applies it every day.

Related integrations

Connect TallyPrime and Toast

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started