Daily iOS
Networking

Idempotency keys for transfers

The user taps the send money button, and the signal drops right after the request goes out. What should the app do?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

You can't tell when the drop happened, so a blind retry can send the money twice. Send a client-generated idempotency key in a header, persist it locally, retry only with that same key, and after the limit settle the result through a status lookup API.

Share a question