Xero and Square integration
Xero runs accounting and financial reporting. Square processes payments and manages invoicing and inventory. Connecting the two keeps your financial records aligned with your transaction data. Invoices created in Xero can be sent through Square's payment processing, and Square payments flow back into Xero's general ledger, eliminating manual reconciliation. ml-connector handles the different authentication schemes and manages the sync on a schedule you control.
What moves between them
Square payments and refunds flow into Xero as bank transactions and payments, mapped to the correct Xero bank account and customer record. Xero invoices can be pulled into Square as payment requests or invoices; customer and item records are synchronized bidirectionally so both systems have the same master data. Inventory adjustments from Square can be recorded in Xero as manual journals or inventory adjustments, depending on your workflow. The sync runs on a schedule tied to your reconciliation cycle, with webhooks from either system triggering immediate updates.
How ml-connector handles it
ml-connector stores OAuth2 credentials encrypted for both Xero and Square, managing the 30-minute Xero token refresh and 30-day Square token refresh automatically. It handles the two different webhook signature schemes: Xero sends a plain webhook with a signing key retrieved from the Developer portal, while Square uses HMAC-SHA256; ml-connector verifies each correctly and prevents replay. Customer records are matched by email address or external ID reference; items are matched by SKU or name. Xero's Xero-tenant-id header is required on all Xero API calls and is stored per-customer configuration. Because Xero is page-based paginated (100 records per page), ml-connector iterates through all pages to retrieve full syncs. Square payments are deduplicated using the Square payment ID as the Xero bank transaction external reference. The integration respects both systems' rate limits: Xero (60 per minute per tenant) and Square (standard REST limits). Every record carries a full audit trail, and failed downstream calls can be replayed.
A real-world example
A mid-sized services firm uses Xero for accounting and invoicing, and Square for point-of-sale and online payment processing across multiple locations. Before the integration, the firm exported Square payment summaries at day-end and manually entered them into Xero as deposits, while reconciling customer accounts against Square's transaction list took hours each week. With Xero and Square connected, Square payments flow directly into Xero bank transactions with customer and line-item detail intact, and invoices issued in Xero can be sent as Square payment links for faster collection. Month-end reconciliation now takes minutes instead of days, and the finance team can focus on analysis instead of data entry.
What you can do
- Sync Square payments and refunds into Xero as bank transactions and payments, mapped to customer and account records.
- Pull Xero invoices into Square payment requests or invoices for faster customer payment collection.
- Keep customer and item master data synchronized across Xero and Square so both systems stay aligned.
- Handle OAuth2 token refresh on both sides and verify webhook signatures correctly for each system.
- Reconcile financial records on a schedule tied to your accounting close, with full audit trail and replay capability.
Questions
- Which direction do records flow between Xero and Square?
- Square payments and refunds flow into Xero as bank transactions and payments. Xero invoices can be pulled into Square as payment requests. Customer and item records are kept in sync in both directions. This keeps Xero's accounting records current with actual Square transaction data while allowing Xero invoices to be collected through Square's payment channels.
- How does ml-connector handle the different authentication schemes?
- ml-connector stores both OAuth2 credential sets encrypted and manages token refresh separately for each system: 30-minute cycles for Xero and 30-day cycles for Square. Xero tokens are refreshed automatically before expiry. The Xero-tenant-id header is required on every Xero call and is stored in per-customer configuration so the correct organization is always targeted.
- What happens if an invoice or payment sync fails?
- Every record carries a full audit trail including the error that caused the failure. Failed records can be replayed on demand once the underlying issue is resolved, so no manual re-entry is needed. The integration also respects both systems' rate limits (Xero: 60 per minute per tenant) and backs off if either system returns a limit error.
Related integrations
More Xero integrations
Other systems that connect to Square
Connect Xero and Square
Free to use. Add your credentials, ping your real systems, and see if we fit.
Get started