DEV Community

Payneteasy
Payneteasy

Posted on

Settlement batches group by capture date, not auth date, and reconciliation breaks on day boundaries

Spent a morning chasing a reconciliation gap on a B2B invoicing flow: authorize at 23:40 local time, capture triggered by a backend job that runs at 00:10 once the invoice is finalized.

The authorization and capture land in two different settlement batches, because the acquirer groups transactions by capture timestamp, not authorization timestamp. Our internal ledger was matching on order_id plus auth_date, assuming both events would settle together. They didn't. One order showed up as "authorized, no matching settlement" for 24 hours, then resolved itself the next cutoff cycle.

Nothing was actually wrong. The acquirer's settlement report was doing exactly what its spec said. Our matching logic just assumed same-batch settlement because that's what happens 95% of the time when auth and capture are seconds apart.

Fixed it by matching on a settlement_batch_id pulled from the acquirer's report instead of inferring it from timestamps, and added a 48-hour grace window before flagging an authorization as unsettled.

The part that still bugs me: this only shows up for merchants with delayed capture crossing midnight in the acquirer's settlement timezone, which is rarely the same timezone as the merchant's. Anyone built reconciliation that explicitly tracks the acquirer's cutoff timezone separately from the merchant's business timezone, or did you also find out the hard way?

Top comments (0)