| name | capture-retry-safety |
| description | Review payment capture changes for retry safety, duplicate settlement events, and contract alignment. |
Capture Retry Safety
Review standard
For payment capture endpoints and workers, verify that retry behavior cannot duplicate money movement or settlement side effects.
Flag changes that:
- remove or weaken idempotency-key validation from capture requests
- process the same capture retry as a new money-movement operation
- emit more than one
payment.captured event for the same successful capture or idempotency key
- transition a payment to
captured without first validating the current status is capturable
- update capture behavior without keeping OpenAPI, README guidance, tests, and worker/event contracts aligned
Findings should identify the endpoint or event path, explain the duplicate-settlement or invalid-transition risk, and prefer one of these concrete guards:
- replay the previously stored result for the same idempotency key
- reject unsafe repeated capture attempts before mutating state or emitting events
- add a stable event or capture identifier that downstream settlement workers can use for deduplication
Treat duplicate settlement events and invalid capture state transitions as action required when downstream workers can settle, reconcile, or notify from payment.captured events.