Nightly payment reconciliation

A scheduled sweep replays any settled payment from the last three days that never made it onto an invoice.

What it is

A backstop cron. For every payments adapter and every business enabled on it, list recent settled payments and record any whose session is not already in the payments table. Because recording is idempotent, replaying costs nothing.

Also called: missed webhook · payment never showed up · reconcile payments · payment safety net

See it
Nightly payment reconciliation
Prepared for
Gideon Alt
1140 Ridge Line Rd · Fair Play
Shell package$26,331
Concrete & site$7,645
Doors & windows$5,096
Trim & finish$3,398
Total
$42,470
Signature
Best as a small ops panel mock showing the sweep's JSON result: orgs, scanned, recovered, alreadyOk, failed. src/app/api/cron/stripe-reconcile/route.ts. Sample data — no customer information appears here.
How it works
  1. 1A three-day lookback window per sweep.
  2. 2isStripeSessionRecorded skips anything the webhook or the return-trip already handled.
  3. 3One business's failure is caught and logged without stopping the others.
  4. 4The response reports orgs, scanned, recovered, alreadyOk and failed counts.
Why we built it

Both confirmation paths can miss: the customer closes the tab, and the notification from the processor lands during a deploy window or a brief outage and is gone. The invoice then sits unpaid with the money already collected, and nobody finds out until the customer complains about being chased. A regular sweep re-checks recent payment sessions against the processor and settles anything that slipped through, so the invoice updating itself once it is paid holds even on a bad night.

The problem
  • Payments lost to a dropped webhook during a deploy or outage.
  • Manual reconciliation between the processor's dashboard and the invoice list.
Sound familiar?
What you get
No payment stays unrecorded for more than a sweep.
The recovery is automatic and reports what it fixed.

See it on your own jobs

Twenty minutes, your numbers, no slide deck. We’ll build one of your real buildings in front of you and send you the estimate link at the end — yours to keep either way.

or keep browsing features →