Scrivio Interview library
LeadershipPrincipal5 min read · updated 12 November 2026

How would you argue for investment in end-to-end idempotency (APIs, messaging, payments) to leadership that sees it as engineering overhead?

We frame idempotency as a business cost rather than an engineering preference: duplicate charges, refunds, support tickets and regulatory exposure from double processing. We explain that distributed systems deliver messages at least once in practice, so exactly-once effects must be built through deduplication, and we back it with incident history showing the share caused by retries and redelivery. Then we propose a platform capability that makes each team pay less than building it alone, with measurable goals such as zero duplicate financial transactions, audited regularly.

Why this question is asked

To many leaders, idempotency sounds like an internal quality concern that engineers want time for, competing with features customers can see. Yet its absence shows up as very visible events: customers charged twice, refunds, angry calls and sometimes regulators asking questions. Interviewers ask this leadership question to see whether a senior engineer can translate a technical property into the language of risk and money, and propose an investment that is bounded and measurable. In this answer, we will build the argument step by step: the business cost, why it cannot be avoided, the evidence, the proposal and how we will measure success.

1Start From the Business Cost

Leadership decides on costs, risks and benefits, so we start there. Every duplicate financial operation has a direct cost: the duplicate charge must be refunded, often with a fee, and someone in support spends time on the ticket. It has an indirect cost in trust, because a customer charged twice is likely to leave. In regulated industries it also has a compliance cost: double debits can lead to complaints to regulators, audit findings and mandatory reporting.

We put numbers on it from our own data. For example: 1,400 duplicate charges last year, an average refund handling cost of 25 euros including support time, 18 chargebacks with fees, and one regulatory complaint that took two weeks of senior staff time. That is already a six-figure annual cost before counting lost customers.

2Why It Is Not Optional in Distributed Systems

The next step is to explain, without jargon, why duplicates are not a sign of sloppy teams but a normal property of distributed systems. When a service calls another over a network and the response is lost, the caller cannot know whether the work happened, so it must either retry and risk doing it twice, or give up and risk not doing it at all. Message brokers make the same choice: Kafka, RabbitMQ and cloud queues all deliver at least once in practice, meaning a message may arrive more than once after a failure.

So exactly once is not something we can buy from infrastructure end to end. An effect that happens exactly once has to be built: the receiver must recognise a repeat and ignore it. That is all idempotency means. The more services and queues a payment passes through, the more places a duplicate can enter, which is why the investment has to cover APIs, messaging and payments together.

Step throughWhere duplicates can enter one payment
  1. Mobile appuser taps pay twice, app retries after timeout
  2. API gateway and service meshautomatic retries on errors
  3. Payment serviceretries the provider call
  4. Message brokerredelivers the PaymentCompleted event
  5. Ledger and notification consumersprocess the event again

5 layers, from the top down. Step through them one at a time.

Each layer behaves correctly on its own; without deduplication the effects add up.

3Show the Evidence From Our Own Incidents

General arguments convince fewer people than our own history. We review the last two years of incidents and classify the ones caused by retries, double submissions or message redelivery. A typical finding might be that 22 percent of customer-impacting incidents in payments and fulfilment involved duplicate processing, including the costliest one of the year. We show two or three short incident stories, in plain words, with what each cost. This moves the conversation from engineers want this to this is already costing us, repeatedly.

4Propose a Platform Capability, Not a Tax on Every Team

Leadership often fears that every team will spend months on this. So the proposal is to build it once. A small platform team delivers a library for idempotency keys and consumer deduplication, a shared key store, client helpers that keep keys stable across retries, guidelines and lint rules, and test tooling that injects duplicates. Teams then adopt it in days rather than designing it themselves.

We give the investment a size and a sequence: for example, two engineers for two quarters, starting with the payment flow because it carries the highest cost, then orders and fulfilment. We compare it with the annual cost of duplicates and with the alternative of each team building its own, which costs more in total and produces inconsistent results.

The proposal in numbers (illustrative)
ItemValue
Annual cost of duplicates nowabout 150,000 euros plus regulatory risk
Share of payment incidents from duplicates22 percent
Platform investment2 engineers for 2 quarters
Team adoption costa few days per service
Goalzero duplicate financial transactions

5Set Measurable Goals and Audit Them

An investment needs a way to see whether it worked. We set goals that leadership can follow without understanding the mechanism: zero duplicate financial transactions, measured by a daily reconciliation that looks for two charges with the same order and amount within a short window; a drop in duplicate-related incidents; and adoption of the library by every service in the payment path by a given date. The reconciliation also becomes an audit control that compliance teams value, which turns the work from overhead into evidence that the company controls its financial processing.

6Follow-up questions

What if leadership still says it is overhead?

Then we ask them to choose the risk explicitly: accept a measured number of duplicate charges and their cost, or fund the work. Making the trade-off visible, with an owner who accepts the risk, is often enough, because few leaders want to sign off on charging customers twice. We can also start smaller, with the payment flow only, and expand after showing results.

Is it enough to make the payment service idempotent?

No, because duplicates can enter at every hop: client retries, gateways, the provider call and event consumers. The payment service alone would still pass on duplicate events to the ledger or send two confirmation emails. That is why the argument is for end-to-end idempotency.

How do you keep the investment from growing?

We define a clear scope, a library, key store, guidelines and tests, and measure adoption and incidents each quarter. Additional work, such as deduplicating non-financial flows, is proposed separately with its own case.

7Conclusion

In this answer, we built the case for end-to-end idempotency in the language leadership uses. We priced duplicates in refunds, support, chargebacks and regulatory exposure, explained that at-least-once delivery makes deduplication necessary, showed our own incident history, proposed a bounded platform capability that is cheaper than each team building its own, and set measurable goals such as zero duplicate financial transactions, checked by reconciliation.

What to say in the interviewAbout 80 seconds aloud

Open with

I would not argue for idempotency as engineering quality; I would argue from business cost. First I would put numbers on what duplicates already cost us: duplicate charges and refunds, support time, chargeback fees, and regulatory exposure, because double debits lead to complaints and audit findings.

Then, if they want more

Then I would explain why this is not a sign of careless teams. In a distributed system a timed-out call is ambiguous, so callers retry, and message brokers deliver at least once, so the same event can arrive twice. Exactly-once effects are not something infrastructure gives us end to end; we have to build them by deduplicating at each receiver.

Next I would show our own incident history, for example the share of payment and fulfilment incidents caused by retries or redelivery, with two or three concrete stories.

The proposal would be a platform capability rather than a tax on every team: a small team builds an idempotency library, key store, consumer deduplication, guidelines and duplicate-injection tests, so each team adopts it in days. I would size it, say two engineers for two quarters, starting with payments.

Finally I would commit to measurable goals, zero duplicate financial transactions checked by a daily reconciliation, and report them regularly.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "How would you argue for investment in end-to-end idempotency (APIs, messaging, payments)...": https://scrivio-interview-library.netlify.app/spring-boot/rest-api-design/5dbbdb0e36/