← Airbnb Interview Insights

Airbnb·Software Engineer·Technical Phone Screen·Senior

Senior
Jul 2026

Summary

Airbnb software engineer interview with an object-oriented design question centered on a wallet system. Pretty meaty for a single question, they wanted runnable code on top of the design which I wasn't fully expecting.

Questions Asked (1)

Q1

Design an Airbnb-style wallet system. Define the classes and methods needed to handle balances for guests and hosts, payments, refunds, and payouts. Explain how transactions are recorded and errors are handled, then write runnable code with a main function demonstrating basic operations.

System DesignData ModelingTechnical Trade-offs
Author's notes

The part that tripped me up was the transaction recording.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then design a clean domain model with separate classes for User, Wallet, Transaction, and PaymentProcessor. Focus on double-entry bookkeeping for accuracy, idempotency for safety, and clear error handling. Finally, implement a runnable demo that shows deposits, payments, refunds, and payouts with proper transaction logging.

Pro tip: Emphasize idempotency and double-entry accounting early—these are critical for financial systems and show you understand real-world production concerns beyond basic CRUD.

1. Clarify Requirements and Scope

Ask about supported currencies, transaction limits, concurrency needs, and whether real-time processing is required. Define the core operations: add funds, pay, refund, and payout.

2. Design the Domain Model

Identify key entities: User (Guest/Host), Wallet, Transaction, and PaymentMethod. Define relationships and invariants, such as a wallet balance never going negative for guests.

3. Define Classes and Methods

Outline classes with methods: Wallet.deposit(), Wallet.withdraw(), PaymentProcessor.processPayment(), RefundService.issueRefund(), and PayoutService.requestPayout(). Include transaction recording and error handling.

4. Address Data Integrity and Error Handling

Explain how to use database transactions, idempotency keys, and retries to handle failures. Discuss logging and auditing for every transaction.

5. Implement and Demonstrate

Write runnable code with a main function that simulates a guest paying for a booking, a host receiving a payout, and a refund. Show transaction logs and error scenarios.

Key Points to Mention

  • Double-entry bookkeeping: every transaction has a debit and credit, ensuring balances always reconcile.
  • Idempotency: use unique transaction IDs to prevent duplicate charges or payouts.
  • Concurrency control: use locks or optimistic concurrency to handle simultaneous wallet updates.
  • Error handling: define custom exceptions for insufficient funds, invalid refunds, and failed payouts.
  • Transaction logging: record all operations with timestamps, amounts, and statuses for auditability.
  • Separation of concerns: keep payment processing, refunds, and payouts as distinct services or modules.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.