The payment provider throws. The reservation is released so the key does not stay stuck in PROCESSING, and a retry with the same key can charge normally.
Solid arrows: calls. Dashed: replies. Red: errors. Amber: conflicts. Dashed blue boxes: database transactions (each IdempotencyReserver method opens its own); amber boxes: alternative branches.
What to look for
The demo's simulated PaymentService never fails; this path is the catch block in PaymentFacade.process.
release also runs in its own transaction, so the DELETE is committed even though the exception keeps going up.
Without the release, every retry would get 409 forever, because the row would never leave PROCESSING.
Releasing is safe only when the provider surely did not charge. If a timeout leaves that unknown, a real system should ask the provider before releasing.