Rails 24:00 Orvane Home & Outdoor

← Definitions

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

meaningtestpassedobservedexpected
paymentscount_betweenpassed28between 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.

Changed 2026-10-12: Agreed with the owner.

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

Tests: count_between