ml-connector
Sage 100Square

Sage 100 and Square integration

Sage 100 runs your on-premises accounting and inventory. Square runs your point-of-sale, payments, and online storefront. Connecting the two keeps your product catalog aligned, your payments recorded in the general ledger, and your customer lists consistent across both systems. New items added to Square update Sage 100 inventory, Square payments post to the correct GL accounts, and refunds record as credits in Sage 100 accounts receivable without manual re-entry.

How Sage 100 works

Sage 100 is an on-premises ERP that covers accounts receivable, accounts payable, general ledger, inventory, purchasing, and sales orders. It exposes data through a local Windows agent via the BOI COM layer, or through SOAP for sales orders and customers only. Access requires a username and password passed per call with a three-character company code; there is no OAuth or token refresh. Sage 100 has no webhooks or push events, so all data flows are polling-based. The system requires IIS over SSL, and users must be individually enabled for Web Services in Sage 100 administration.

How Square works

Square is a cloud-based REST API for payments, commerce, inventory, invoicing, and vendor management, versioned at v2 with a production endpoint at https://connect.squareup.com/v2. Authentication uses OAuth 2.0 Authorization Code flow or Personal Access Tokens, both with Bearer token authorization; access tokens expire in 30 days and require refresh-token handling. Square pushes data through webhooks with HMAC-SHA256 signature verification, supporting events for payments, refunds, invoices, orders, customers, and inventory changes. The Vendors API is in beta and the Orders API update endpoint is beta; there is no Purchase Orders API or Chart of Accounts API since Square operates at the commerce layer only.

What moves between them

The integration flows primarily from Square into Sage 100. Square payments and refunds post as GL journal entries into Sage 100's general ledger, mapped to customer and revenue accounts. Square orders create or update customer records in Sage 100 accounts receivable. Inventory synchronizes bidirectionally: items added to Square's catalog update Sage 100 inventory, and Sage 100 inventory adjustments push back to Square so stock counts stay aligned. Customer records also sync bidirectionally so new customers created in either system appear in the other. All movement happens on Sage 100's polling cadence since the ERP has no webhook capability.

How ml-connector handles it

ml-connector maintains separate credential stores for both systems: the Sage 100 local BOI agent connection (with the customer's required company code and agent API key) and the Square OAuth 2.0 bearer token. It refreshes the Square access token every 25 days before the 30-day expiry, and it appends the company code to every Sage 100 call through the local agent. Since Sage 100 has no webhooks, ml-connector polls Square's payment and order data on a cadence tied to your point-of-sale schedule, typically every 15 minutes for high-frequency transactions and hourly for inventory. It maps Square line items to Sage 100 GL accounts using a customer-defined chart, and validates every GL account and customer ID against the ERP before posting. Inventory quantity changes are checked for existence in Sage 100 before update to avoid lock contention on the COM layer, with retry backoff for write failures. Every payment, order, and inventory record carries a full audit trail including the original Square event ID so failed GL postings can be safely replayed.

A real-world example

A mid-sized retail merchant runs Sage 100 on-premises for accounting and inventory, and Square for point-of-sale at three physical stores plus an online store. Before the integration, the accounting team exported daily settlement reports from Square and manually entered payment totals and refunds into Sage 100's cash receipts and accounts receivable at the end of each day, a process that took 45 minutes and was prone to posting errors. New inventory items had to be added to both systems separately. With Sage 100 and Square connected, every transaction posts to the general ledger automatically on the correct revenue and clearing accounts, matched to the Square location where the sale occurred. Inventory adjustments sync in both directions, so merchandise added to the online catalog or adjusted in the store immediately updates Sage 100, eliminating shelf-count discrepancies and month-end write-downs.

What you can do

  • Post Square payments and refunds into Sage 100 general ledger accounts, mapped by product and location.
  • Sync Square customers into Sage 100 accounts receivable and keep contact details aligned bidirectionally.
  • Match inventory between Sage 100 and Square so stock levels stay current across point-of-sale and the online store.
  • Authenticate Square with OAuth 2.0 bearer tokens and Sage 100 with the local BOI agent, handling the 30-day token refresh automatically.
  • Poll on a schedule aligned to your retail operations with audit trails on every transaction, safe replay of failed GL postings, and automatic retry with backoff.

Questions

How does ml-connector handle Sage 100 being on-premises and Square being cloud-based?
ml-connector connects to the local BOI agent running on the Sage 100 server, which exposes the full GL, AR, AP, and inventory APIs via COM. It also connects to Square's cloud REST API using OAuth 2.0. The two connections are maintained separately, and ml-connector maps transactions from Square into Sage 100's GL structure using the customer's defined chart of accounts.
What records can sync between Sage 100 and Square?
Payments, refunds, invoices, customers, and inventory items can all sync. Square payments and refunds post as GL journal entries in Sage 100. Orders and customers flow from Square into Sage 100 accounts receivable. Inventory is bidirectional: new items added to Square update Sage 100 stock, and Sage 100 inventory adjustments push back to Square.
Does the integration handle the 30-day Square access token expiry?
Yes. ml-connector tracks the expiry of Square's OAuth 2.0 bearer token and refreshes it every 25 days to ensure no outages from token timeout. Sage 100's username and password are stateless per call, so no refresh is required there.

Related integrations

Connect Sage 100 and Square

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

Get started