ml-connector
Microsoft Dynamics NAVSquare

Microsoft Dynamics NAV and Square integration

Microsoft Dynamics NAV runs your financials and operations. Square runs your payments and commerce. Connecting the two keeps your order and payment records in sync across systems. New orders and payments in Square flow into Microsoft Dynamics NAV as sales invoices and cash receipts, while customer records stay aligned. ml-connector handles the different APIs on each side and automates the data movement on a schedule you control.

How Microsoft Dynamics NAV works

Microsoft Dynamics NAV exposes vendors, customers, purchase orders, purchase invoices, sales invoices, sales orders, accounts, general ledger entries, dimensions, items, employees, and journals through OData v4 REST or legacy SOAP, authenticated with OAuth 2.0 client credentials against a tenant-specific or on-premises instance URL. NAV supports both webhooks (3-day subscription expiry, ~30 second batching) and polling for data changes. GL entries are immutable once posted, and GL accounts are read-only through the standard API. On-premises deployments require OData services enabled and firewall access to port 7048.

How Square works

Square exposes payments, refunds, invoices, orders, customers, vendors, catalog items, inventory, and team members through a versioned REST API, authenticated with OAuth 2.0 bearer tokens that expire every 30 days. Square supports webhooks for push notifications on payments, orders, invoices, customers, and inventory changes, with signature verification via HMAC-SHA256. Square has no GL accounts or chart of accounts API, as it is a commerce and payments layer only. Inventory adjustments are writable, but items cannot be created directly through the API.

What moves between them

The main flow is Square into Microsoft Dynamics NAV. After a Square payment or order is placed, ml-connector reads the payment and order data from Square and posts it into NAV as a sales invoice or cash receipt, mapped to the matching customer and GL accounts. Customer records sync bidirectionally so NAV customer lists stay current with Square contacts. Inventory reference data from Square can inform NAV item management. Refunds and payment adjustments flow the same direction. Since Square has no GL account structure, ml-connector maps Square's line items and fees to NAV's chart of accounts and cost dimensions based on item categories and payment types.

How ml-connector handles it

ml-connector stores OAuth credentials for both Square and Microsoft Dynamics NAV encrypted and refreshes the Square bearer token before expiry every 30 days. For NAV, it handles OAuth2 client credentials against your specific tenant URL (cloud) or on-premises instance. It accepts NAV webhooks if enabled, but also polls on a cadence you define to catch any Square payment or order changes. Square payments with multiple line items or fees are split into separate NAV journal lines mapped to the appropriate GL accounts. Customer names and addresses synced from Square are matched against NAV's customer master before posting, and new customers can be created in NAV on first sync. NAV's immutable GL entries mean all sales transactions are write-once; ml-connector tracks which Square payments have already posted to avoid duplicates, and every record carries a full audit trail for month-end reconciliation and replay if a downstream call fails.

A real-world example

A retail and e-commerce business runs Microsoft Dynamics NAV for back-office accounting, procurement, and inventory, and uses Square for in-store and online payments. Before integration, staff exported daily payment batches from Square and manually entered them into NAV as sales invoices and cash receipts, a process that was error-prone and delayed month-end close. Online orders and store transactions were tracked separately, making it hard to reconcile total revenue. With Microsoft Dynamics NAV and Square connected, each Square payment and order automatically posts into NAV with the correct GL accounts and customer records. Reconciliation is instant, duplicate-entry work is gone, and the finance team spends month-end close on analysis instead of data entry.

What you can do

  • Post Square orders and payments into Microsoft Dynamics NAV as sales invoices and cash receipts, allocated to the correct GL accounts.
  • Keep NAV customer records in sync with Square customers, reflecting new sign-ups and profile changes.
  • Map Square line items and fees to NAV chart of accounts and cost dimensions so payments land on valid ledger accounts.
  • Refresh OAuth tokens for both Square (30-day expiry) and NAV, handling re-authentication without manual intervention.
  • Poll Square on a schedule you define with deduplication and full audit trail for every transaction.

Questions

Which direction does data move between Microsoft Dynamics NAV and Square?
The main flow is Square into Microsoft Dynamics NAV. Orders, payments, and refunds from Square post into NAV as sales transactions, while customer and inventory reference data can sync bidirectionally. NAV GL entries are immutable once posted, so ml-connector does not write financial adjustments back to Square.
How does the integration handle the fact that Square has no chart of accounts?
Square is a commerce and payments platform without a GL account structure. ml-connector maps Square line items and payment types (sales, discounts, fees, refunds) to NAV GL account codes and dimensions based on item category and transaction type. A mapping table defines which Square transaction types post to which NAV GL accounts, allowing flexible allocation.
What happens when a Square payment contains multiple line items or fees?
ml-connector splits multi-item Square orders into separate journal lines in Microsoft Dynamics NAV, one per item and one per fee type, all posting to the same customer and invoice date. This preserves the detail for NAV's GL accounts while keeping the audit trail intact so each Square item traces back to its NAV posting.

Related integrations

Connect Microsoft Dynamics NAV and Square

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

Get started