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 Revenue journal entries by payment method (card, cash, gift card)
Payouts Bank deposit reconciliation
Refunds Refund journal entries
Tips Tip liability tracking
Locations Multi-location support

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

When a payment is completed, DayZero automatically creates journal entries:

  • Card sale: Debit Square Receivable / Credit Sales Revenue
  • Cash sale: Debit Cash / Credit Sales Revenue
  • Tips: Debit Square Receivable / Credit Tips Payable
  • Sales tax: Debit Square Receivable / Credit Sales Tax Payable
  • Processing fees: Debit Processing Fees / Credit Square Receivable
  • Refunds: Reversal of the original revenue entry

Payout Reconciliation

Square payouts are matched against bank deposits. Each payout reflects the net of sales, refunds, fees, and adjustments for the period.

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:

Event Action
payment.completed Creates revenue journal entry
payment.updated Updates existing payment record
payout.sent Creates payout reconciliation entry
refund.created Creates refund reversal journal entry

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.