Tinker Card payments

by Samy (Kondasamy Jayaraman) · drawn with Colorfigures by April Zhu

Day 1, by day. Ben’s order, without an idempotency key.held €0.00 · charged €0.00 · Larkspur kept €0.00

Chapter 4 of 7

Pressed Pay twice

The shop’s payments ran smoothly until a slow morning. Ben pressed Pay, waited, and the till tried again. Ben wrote in, cross.

This chapter: When a payment request gets no answer, how do you retry without charging twice?

About this chapter

You will learn

  • A timeout doesn’t mean it failed
  • A retry can charge twice
  • An idempotency key makes a retry safe

Words you’ll meet

Timeout
Giving up waiting for an answer: the request may still have worked.
Idempotency key
A unique name sent with a request, so a retry with the same name is done only once.

Step 1 of 4

Ben presses Pay. The till’s request gets no answer, a , so the till sends it again.

Predict how many times Ben is charged.

Ben’s €18.50 request timed out and the till sent it again. How many times is Ben charged?