# Follow-up: Payment log retention

- Status: Accepted
- Date: 2024-09-16
- Decided by: Imogen Varga, with Hana Sato and Rufus Achterberg
- Follows: the August 2024 duplicate charges incident; amends ADR-003

## Context

ADR-003 keeps all application logs for 30 days. In the August incident we lost a chargeback because the
payment logs for a June booking had already been deleted. Card schemes allow chargebacks up to 120
days after a payment, and some disputes arrive later still through the operators.

## Decision

Payment logs are now kept for 13 months, then deleted automatically. This replaces the 30-day period
of ADR-003 for payment logs only; other application logs keep the 30-day retention.

To limit the privacy cost, payment logs are stored in a separate bucket that only the payments engineer
on call and the support lead can read, every read is recorded, and passenger names are replaced by the
booking reference before the logs are written.

## Consequences

- Support can answer a chargeback with the original payment flow for any payment in the last 13 months.
- Storage for payment logs grows to about thirteen times its previous size; the cost is small next to
  one lost chargeback a month.
- The change is applied to new logs from 2024-09-20. Logs deleted before then cannot be recovered.
