Accounting Integrations
Sync invoices, customers, and items with QuickBooks, Xero, FreshBooks, or Wave
On this page
Overview
BlueClerk integrates with QuickBooks, Xero, FreshBooks, and Wave to keep your books in sync automatically. Connect your accounting software once, then invoices, customers, and items sync automatically — no double entry required. BlueClerk monitors sync health and alerts you with notifications when sync failures occur, helping you identify and fix connection issues before they impact your books.
Important behavior & protections
-
CRITICAL: Secure Token Handling — OAuth tokens for QuickBooks, Xero, and FreshBooks are encrypted at rest in the database. The system validates credentials during OAuth setup — rejecting empty strings, placeholder values, and unset environment variables immediately to prevent connection failures. When auto-sync encounters authentication errors (invalid tokens, revoked access, or expired credentials), BlueClerk automatically marks your accounting connection as down, clears the stored refresh token, and sends you a notification so you can reconnect.
-
CRITICAL: Square Payout Sync for QuickBooks — When Square payouts settle (payout.sent event), BlueClerk automatically creates QuickBooks Deposit records that match your net bank deposit. The deposit includes one positive line per payment in the payout and one negative line for total processing fees (to Merchant Service Fees expense account), ensuring your QuickBooks balance matches your actual bank deposits for one-click reconciliation. This only happens when you have QuickBooks connected with auto-sync enabled.
-
CRITICAL: Webhook Security Hardened — Webhook verification for connected providers (for example Square) now requires the corresponding webhook signature key environment variables in production. If the key is missing, webhooks are rejected with a 503 error to prevent unauthorized POST requests from marking invoices paid or changing sync state. In development (NODE_ENV != production), webhooks are allowed through without signature verification for local testing.
-
CRITICAL: Sync Must Be Awaited — Invoice and payment sync operations are now properly awaited in auto-sync flows. Previously, fire-and-forget background syncs could be terminated before completion, leaving Payment rows stuck in PENDING state. BlueClerk now awaits both invoice and payment syncs and logs failures with structured error details plus in-app notifications for visibility.
-
NEW: Connection Down Status on Auth Failures — When auto-sync encounters authentication errors (invalid tokens, revoked access, or expired credentials), BlueClerk automatically marks your accounting connection as down and sends you a notification. This helps you quickly identify and fix connection issues before they impact your books. The system creates one notification per auth failure type to avoid alert spam.
QuickBooks invoice voiding & resync behavior (what changed)
QuickBooks may sometimes void or update invoices on their side (for example, when an invoice is deleted/voided in QuickBooks or when QuickBooks rejects or supersedes a change). We've improved how BlueClerk handles those events so you get clearer, correct feedback and avoid misleading resync actions:
-
Clearer UI messages: When a QuickBooks sync results in the invoice being voided in QuickBooks, BlueClerk now surfaces a specific confirmation message (for example: "Invoice voided in QuickBooks") rather than a generic "synced successfully" message. This helps you understand the provider-side outcome immediately.
-
Accurate sync state and fewer misleading resyncs: Manual sync actions and the Sync badge/button now reflect the true QuickBooks state (including VOID). Resync attempts will not present misleading success statuses when the provider has voided or otherwise changed the document. This reduces confusion and prevents accidental repeated resync attempts that don't resolve provider-side voids.
-
Robust webhook handling: QuickBooks webhook notifications are validated and processed so provider-initiated changes (including voids) are applied consistently to the BlueClerk record. Webhook signer verification is enforced in production for security.
-
Recovery workflow: If an invoice was voided in QuickBooks but you need to restore it in BlueClerk, use the Undo Void feature in BlueClerk (Invoice → Undo Void). Undo Void performs safety checks with connected accounting providers and will prompt you to reconnect or reconcile if required to