Booking.com System Design Interview: Split Payment Capture for Bookings
Based on questions reported for Booking.com interviews
The interviewer opens
Hi, and thanks for joining. Welcome to your interview for the software engineer role at Booking.com. We'll design a system together, and you can sketch on the whiteboard on the right of your screen as you talk. If you need to step out or take a break, the Pause button at the top right will pause the interview.
The problem is about taking split payments for a booking, and it's up in the Problem tab now. Please read through it and ask me anything you'd like clarified before you start drawing.
The problem
Design an internal Booking.com system that takes a guest's payment for a booking in parts, following a per-booking schedule (for example, 50% at booking and 50% two days before check-in), charging each part at the right time.
Must do
- Store each booking's payment schedule: parts as percentages with when each is due
- Charge the first part when the booking is made, if the schedule says so
- Charge later parts automatically when they fall due
- Record every charge attempt and outcome so other teams can see what is paid
Must hold
- Every part is charged exactly once, for the right amount, even if the provider times out or a job crashes
- Charges happen on time, not late or early