Square Integration

Connect your Square POS account for automated revenue recognition, payment tracking, and payout reconciliation across all your retail locations.

What Gets Synced

Data Description
Payments Rolled up into one daily sales summary per location
Refunds Netted into the daily summary as contra-revenue (Sales Refunds)
Payouts Reconciled against Square Clearing as deposits land in the bank
Tips Tracked as a liability (Tips Payable)
Sales tax Tracked as a liability (Sales Tax Payable)
Processing fees Booked as an expense, split out from revenue
Locations Multi-location support (one summary per location per day)

Connect Square

OAuth (Recommended)

From the Integrations page in DayZero, click Connect Square. You'll be redirected to Square to authorize access.

Or via API:

bash
curl "https://api.ondayzero.com/api/v1/square/connect-url" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"

The response includes a connect_url. Redirect the merchant to that URL to begin the OAuth flow. After authorization, DayZero stores the connection and begins syncing.

Automatic Accounting

Square is point-of-sale, so DayZero does not post a journal entry per payment (a busy venue does thousands a day). Instead, payments are stored as a subledger and rolled up into one daily sales summary per location — the bookkeeping standard for POS. Once a business-local day closes, DayZero posts a single balanced entry:

plaintext
Dr  Undeposited Funds      (cash + other tenders collected)
Dr  Square Clearing        (card tenders, net of fees)
Dr  Square Processing Fees (fees for the day)
        Cr  Sales Revenue      (net sales — excludes tax and tips)
        Cr  Sales Tax Payable  (tax collected, a liability)
        Cr  Tips Payable       (tips collected, a liability)

This keeps revenue, tax, and tips cleanly separated and splits tender so the card and cash sides reconcile independently.

Refunds net into the same daily summary as contra-revenue:

plaintext
Dr  Sales Refunds          (amount refunded that day)
        Cr  Square Clearing    (card refunds — clawed back from a payout)
        Cr  Undeposited Funds  (cash/other refunds — returned from the drawer)

A day that only has refunds (no sales) still gets a summary so the contra-revenue is booked.

Posting configuration

Each connection has a posting_mode (default daily_summary), an optional posting_start_date, and a daily_summary_timezone that defines when a business-local "day" ends — critical for "what counts as today's sales".

Payout & Cash Reconciliation

Card sales flow into Square Clearing, which is drained when the matching Square deposit lands in your connected bank feed. DayZero matches the deposit to the payout (exact amount, within a few days of the expected arrival) and books it as:

plaintext
Dr  Operating Bank Account (the real bank deposit)
        Cr  Square Clearing    (drains the card side)

This uses the actual bank transaction — DayZero does not post a separate payout entry, which would double-count the deposit. Fees are recognized at sale time in the daily summary (accrual), so the deposit's net amount is exactly what clears. Cash sales flow into Undeposited Funds, drained when the operator records a bank deposit (cash reconciliation).

A connected bank feed is required for automatic card reconciliation. Without one, Square Clearing accumulates and can be reconciled manually.

Connection Status

bash
curl "https://api.ondayzero.com/api/v1/square/status" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"

Returns connection health, location count, payment totals, and last sync timestamp.

Manual Sync

Trigger a manual sync of recent payments:

bash
curl -X POST "https://api.ondayzero.com/api/v1/square/sync" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"

Webhooks

DayZero processes the following Square webhook events in real time:

Webhooks are store-only triggers — they persist data and nudge the daily rollup rather than posting per-event journal entries.

Event Action
payment.completed Stores the payment; triggers the daily rollup
payment.updated Updates the stored payment record
payout.sent Stores the payout; matched to the bank deposit when it lands
refund.created Stores the refund; netted into the daily summary

Disconnect

bash
curl -X DELETE "https://api.ondayzero.com/api/v1/square/disconnect" \
  -H "Authorization: Bearer dz_your_token_here" \
  -H "x-business-id: YOUR_BUSINESS_ID"

Revokes stored credentials and removes the integration from the business.