Skip to content

Square Orders Page

Purpose

The Square Orders page lists orders from your Square account (via Square API). You can see order details, enrich customer data when needed, and resync an order to LGL (e.g. after a webhook failure or to re-push with corrected mapping).

What You See

  • List of orders – Fetched from Square API (cursor-based pagination). Columns may include: order ID, date, customer, amount, status, sync status (synced / not synced / failed).
  • Links – Open order in Square dashboard (external link).
  • Enrich – If order has customer_id but minimal details, “Enrich” may fetch full customer from Square so the next resync has complete data. Implemented via POST /api/square/orders/enrich (e.g. send up to 5 order IDs).

Resync

  • Resync – Re-run sync for this order: Worker fetches the order (and customer if needed) from Square and runs the same logic as the webhook (find/create constituent, create gift, audit log). Uses POST /api/square/orders/:orderId/resync.
  • Force – Option to bypass idempotency (e.g. ?force=true). Use when you intentionally want to create a second sync attempt; be aware this can create a duplicate gift in LGL if the same order is synced twice with different external_id variants.

When to Use

  • Webhook missed – Order exists in Square but never appeared in Syncs or LGL. Resync to push it.
  • Wrong fund – You fixed the location override or type default; resync to re-push with new mapping (use Force if the existing sync is idempotent and would be skipped).
  • Debugging – Inspect order and customer data from Square before or after sync.

API

  • GET /api/square/orders – List orders (query: cursor, limit). Requires admin/super_admin.
  • POST /api/square/orders/enrich – Enrich customer data for given order IDs (body: array of IDs). Requires admin/super_admin.
  • POST /api/square/orders/:orderId/resync – Resync one order to LGL. Query force=true to skip idempotency. Requires admin/super_admin.