Skip to main content

Real architecture · Senior

Airbnb: preventing double payments (Orpheus)

Real production architecture. Key points: Idempotent Operations and Distributed Transactions.

17 min read · Source: Airbnb · Content reviewed on October 23, 2026

Short answer

Real production architecture. Key points: Idempotent Operations and Distributed Transactions. Airbnb had been migrating its infrastructure to a service-oriented architecture (SOA). The source lists gains, such as developer specialization and faster iteration, and points out that, for billing and payments, it became harder to maintain data integrity.

01 · CONTEXT

Payments in a service-oriented architecture

Airbnb had been migrating its infrastructure to a service-oriented architecture (SOA). The source lists gains, such as developer specialization and faster iteration, and points out that, for billing and payments, it became harder to maintain data integrity.

An API call to a service that calls other downstream services, each changing state and possibly with side effects, amounts to running a complex distributed transaction.

  1. A client makes an API call to a payments service.

    Architecture diagram: Chain of calls between payment services
    CLClient
    CPPayments service
    CPDownstream service A
    CPDownstream service B
  2. That service makes other API calls to downstream services.

    Architecture diagram: Chain of calls between payment services
    CLClient
    CPPayments service
    CPDownstream service A
    CPDownstream service B
  3. Each downstream service changes state and may have side effects.

    Architecture diagram: Chain of calls between payment services
    CLClient
    CPPayments service
    CPDownstream service Achanges state
    CPDownstream service Bchanges state
  4. Altogether, it amounts to running a complex distributed transaction.

    Architecture diagram: Chain of calls between payment services
    CLClient
    CPPayments service
    CPDownstream service A
    CPDownstream service B

02 · CONSISTENCY

Consistency when there is no single transaction

To ensure consistency across all services, the source mentions that protocols such as two-phase commit could be used. Without such a protocol, distributed transactions make it hard to maintain data integrity, allow graceful degradation, and achieve consistency.

Moreover, requests inevitably fail in distributed systems: connections drop and time out at some point, especially in transactions that bring together several network requests.

The source names three common techniques to achieve eventual consistency: read repair, write repair, and asynchronous repair.

TechniqueWhat the source says
Read repairCited as one of the three common techniques, with no detail in the public part of the article
Write repairEach client write call to the server tries to repair an inconsistent state
Asynchronous repairThe server runs consistency checks, such as table scans, lambda functions, and cron jobs

Asynchronous server-to-client notifications are also widely used in the payments industry to force consistency on the client side.

03 · THE CHOICE

Write repair and idempotency

The solution described in the post uses write repair: each client write call to the server tries to repair an inconsistent state. The source notes that write repair requires smarter clients.

The article's subtitle presents the result as a generic framework for idempotency, built to achieve eventual consistency and correctness in the payments microservices architecture.

An idempotent operation has the same effect whether it is executed once or several times.

  1. In the write repair strategy, the client sends a write call to the server.

    Architecture diagram: Write repair with asynchronous verification
    CLClient
    CPPayments service
    CPDownstream service
    CPAsync verifier
  2. The service propagates the write to a downstream service, which changes state.

    Architecture diagram: Write repair with asynchronous verification
    CLClient
    CPPayments service
    CPDownstream service
    CPAsync verifier
  3. Connections drop and time out at some point, especially in transactions with several network requests.

    Architecture diagram: Write repair with asynchronous verification
    CLClient
    CPPayments service
    CPDownstream service
    CPAsync verifier
  4. Each client write call to the server tries to repair an inconsistent state.

    Architecture diagram: Write repair with asynchronous verification
    CLClient
    CPPayments service
    CPDownstream service
    CPAsync verifier
  5. Asynchronous checks run by the server act as a second line of defense.

    Architecture diagram: Write repair with asynchronous verification
    CLClient
    CPPayments service
    CPDownstream service
    CPAsync verifier

04 · SOURCE LIMITS

What the public part covers

The page marks the article as a members-only story, and the public text breaks off right after stating that write repair requires smarter clients. This case is therefore limited to the problem and the consistency strategy presented in that part.

Frequently asked questions

What is Airbnb: preventing double payments (Orpheus)?

Real production architecture. Key points: Idempotent Operations and Distributed Transactions.

What does the Airbnb: preventing double payments (Orpheus) design cover?

It is organized in these sections: Payments in a service-oriented architecture, Consistency when there is no single transaction, Write repair and idempotency, and What the public part covers.

How long is Airbnb: preventing double payments (Orpheus) and what level is it?

It takes about 17 minutes to read and is rated Senior level.

Now design it yourself

Run this case as an interview in the System Design school: you make the decisions, the tutor challenges them and you see how your design scores.