OrdersConcepts
Order Concepts
Core concepts for understanding booking orders, reservations, and the event system
Order Concepts
This section explains the fundamental concepts behind Rahal's booking order system.
Core Concepts
Orders
An order is the top-level entity representing a booking transaction. It ties together:
- Buyer: The user making the booking
- Payment: How and how much was paid
- Reservations: The actual travel bookings (flights, hotels)
- Events: A complete audit trail of what happened
Reservations
Reservations are the individual travel bookings within an order. An order can have multiple reservations—for example, a flight and a hotel booked together.
Each reservation:
- Has its own external ID from the travel supplier (IRIX)
- Tracks its own price and currency
- Has an independent status
Transactions
Transactions record payment activity:
- The amount paid
- Payment provider details
- Associated refunds (if any)
Events
Events provide an immutable audit trail of everything that happens to an order. They're essential for:
- Debugging issues
- Compliance and auditing
- Understanding order history