.NET & C# · Web API
How would you answer an interview scenario involving idempotency and retries in Web API?
For a payment API, I would require an idempotency key for a create-payment command. The server would store the key with the request identity and resulting outcome, so a retry with the same key returns the original result instead of creating a second charge. I would define the key scope and retention period, reject conflicting reuse of a key with different input, and ensure downstream side effects follow the same idempotent design.