PracHub
QuestionsCoachesLearningGuidesInterview Prep
|Home/Software Engineering Fundamentals/Airbnb

Implement a reservation widget with pricing

Last updated: Jul 4, 2026

Quick Overview

This question evaluates skills in frontend component state design, data modeling, pricing computation, validation logic, error handling, and API integration for a lodging reservation widget.

  • medium
  • Airbnb
  • Software Engineering Fundamentals
  • Software Engineer

Implement a reservation widget with pricing

Company: Airbnb

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Onsite

Implement a lodging reservation widget with: ( 1) inputs for check-in and check-out dates; compute total price based on nightly rate, length of stay, and dynamic pricing that changes with selected adults and children; ( 2) validation that check-out is after check-in and that guest counts do not exceed capacity; ( 3) a disabled “Book Now” button when the room is sold out or selection is invalid; ( 4) a confirmation dialog on submit. Describe component state, data models, and error states; outline how you would test edge cases such as minimum nights, partial availability, timezone/daylight-saving transitions, and price rounding.

Quick Answer: This question evaluates skills in frontend component state design, data modeling, pricing computation, validation logic, error handling, and API integration for a lodging reservation widget.

Related Interview Questions

  • Design a banking ledger for deposits/withdrawals - Airbnb (medium)
  • Design a Connect-Four-like board game - Airbnb (hard)
  • How do you conduct a code review exercise? - Airbnb (hard)
  • Design an extensible request Retryer - Airbnb (medium)
  • Implement retry wrapper and interdependent validators - Airbnb (hard)
|Home/Software Engineering Fundamentals/Airbnb

Implement a reservation widget with pricing

Airbnb logo
Airbnb
Aug 12, 2025, 12:00 AM
mediumSoftware EngineerOnsiteSoftware Engineering Fundamentals
6
0

Implement a Lodging Reservation Widget

Context

You are building a reservation widget for a property details page. The widget must let guests select dates and guest counts, show a price, validate inputs and availability, and submit a reservation. Assume there is an API that exposes availability by date, rate rules, capacity, and a quote endpoint.

Requirements

  1. Inputs and Pricing
    • Inputs: Check-in date, Check-out date, Adults, Children.
    • Compute total price based on: nightly rate, number of nights, and dynamic pricing that depends on selected adults and children.
    • Show an itemized price breakdown.
  2. Validation
    • Check-out must be after check-in.
    • Guest counts must not exceed capacity and must satisfy rate plan rules (e.g., max adults/children, min nights).
  3. Booking Action
    • Disable the "Book Now" button if the room is sold out for any selected night or the selection is otherwise invalid.
  4. Confirmation
    • On submit, display a confirmation dialog summarizing dates, guests, and the price breakdown before finalizing.
  5. Design Artifacts to Provide
    • Describe component state, data models, and error states.
    • Outline how you would test edge cases (minimum nights, partial availability, timezone/daylight-saving transitions, and price rounding).
Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Airbnb•More Software Engineer•Airbnb Software Engineer•Airbnb Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals

Write your answer

Your first approved answer each day earns 20 XP.

Sign in to write your answer.
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.