// case study 04/05 · payments · backend · now
Backends that never double-charge
result
100% data integrity across production migrations, each one validated by a parallel run before cutover. Zero-downtime releases.
- problem
- Bank GIRO collections and refunds, plus migrations on data that can't be wrong.
- approach
- Idempotency keys, queued retries, reconciliation; parallel-run validation before every cutover.
Key decisions
- Idempotency keys, so a retried request returns the first result instead of charging again.
- Queued retries instead of retrying inline.
- Reconciliation against the bank.
- Migrations run in parallel with the old path and are compared before cutover.
- A timing-out query rewritten with a CTE, now under 100 ms.
Stack
NestJSPostgreSQLRedisNSQ