Chargeback window chargeback_window
Chargebacks inside the last window_hours before their answer is due, answered or not. The window the chargeback_deadline detector watches.
Parameters: window_hours = 72
Test results
| meaning | test | passed | observed | expected |
|---|---|---|---|---|
| payments | count_between | passed | 28 | between 0.0 and 60.0 |
payments · v1 · finance lead
Opened by now, due after now and within window_hours; with whether evidence is filed yet.
SELECT c.id AS chargeback_id, m.name AS marketplace, c.reason, c.amount, c.respond_by,
c.evidence_filed_at <= {now} AS evidence_filed
FROM chargebacks c JOIN marketplaces m ON m.id = c.marketplace_id
WHERE c.opened_at <= {now} AND c.respond_by > {now} AND c.respond_by <= {now} + INTERVAL ({window_hours}) HOUR
ORDER BY c.respond_by