Make a queued payment handler safe to retry
Mid · practical lab · 35 min · runtime python
Brief
A payment handler can run twice when the queue retries. Describe an idempotency-key design using a unique constraint, and what the handler returns when the same key arrives with a different payload.
3 progressive hints are available in the editor.
Public checks
- prevents the second charge — expected:
mentions a unique key checked before charging