PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Other / Miscellaneous/Airbnb

Implement a reservation widget with pricing

Last updated: Mar 29, 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
  • Other / Miscellaneous
  • Software Engineer

Implement a reservation widget with pricing

Company: Airbnb

Role: Software Engineer

Category: Other / Miscellaneous

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

  • Implement retry wrapper and interdependent validators - Airbnb (hard)
Airbnb logo
Airbnb
Aug 12, 2025, 12:00 AM
Software Engineer
Onsite
Other / Miscellaneous
3
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).

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Other / Miscellaneous•More Airbnb•More Software Engineer•Airbnb Software Engineer•Airbnb Other / Miscellaneous•Software Engineer Other / Miscellaneous
PracHub

Master your tech interviews with 7,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
  • Compare Platforms
  • Discord Community

Support

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

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.