Booking Lifecycle Event Model

Design travel-booking state around create, confirm, modify, cancel, fail and reconcile events with explicit ordering and idempotency.

Editorial information
Advertisement

A booking lifecycle model should preserve which events occurred, in what order and from which evidence current state was derived, rather than reducing the reservation to one mutable status field.

Production scenario

A create request times out while the supplier may have created the booking. A CONFIRMED webhook later arrives, followed by cancellation and refund events. One status field loses the audit trail.

Architecture flow

text
Booking Attempt
 -> CREATE_REQUESTED
 -> provider call
 -> CREATED / UNKNOWN / FAILED
 -> CONFIRMED
 -> MODIFIED?
 -> CANCEL_REQUESTED?
 -> CANCELLED?
 -> REFUND/SETTLEMENT?
 -> RECONCILED

Key entities

Use Booking, BookingAttempt, BookingEvent, ProviderBookingReference, PaymentReference and ReconciliationRecord.

Event shape

A useful event stores event ID, booking ID, event type, provider, provider reference, occurred/received timestamps and source such as API response, webhook or reconciliation.

State derivation

Materialize current booking state from event history. Not every incoming event should be allowed to produce every transition.

Out-of-order events require explicit handling.

Idempotency

Webhook delivery can repeat. Deduplicate using provider event IDs or deterministic event keys before applying state changes.

Unknown state

UNKNOWN should be a first-class state after ambiguous timeouts. Marking it FAILED too early can cause duplicate bookings.

Resolve UNKNOWN through lookup and reconciliation.

Separate payment lifecycle

Payment authorization does not prove booking confirmation. Maintain separate booking and payment state machines and reconcile them explicitly.

Failure modes

Common failures include duplicate webhooks, out-of-order events, provider-reference changes, payment/booking divergence, premature cancellation state and duplicate creates after retry.

Concurrency

Protect state materialization with event versions, sequences or optimistic concurrency. Parallel consumers must not apply transitions nondeterministically.

Observability

Track unknown-booking age, duplicate/out-of-order events, booking/payment divergence, reconciliation latency and invalid transitions.

Alternatives

For a simple low-volume single-provider system, an event table plus materialized status may be enough. Full event sourcing is justified only when replay/audit requirements warrant the complexity.

Production checklist

Use immutable events, explicit transition rules, idempotency, ordering/version strategy, UNKNOWN state, separate payment lifecycle, reconciliation jobs, audit trails and replay tooling.

Technical advisory

Let’s review your architecture.

We can assess your travel distribution and metasearch architecture for scalability, failure modes and operations.

Discuss your project →

Related content

architecture

Payment + Booking Distributed Transaction

Model payment and supplier booking as a distributed transaction using authorization, capture, compensation, UNKNOWN outcomes and reconciliation.

paymentbookingdistributed-transaction
Explore →
architecture

Travel Event Reconciliation Architecture

Design deterministic reconciliation across booking, payment, cancellation and supplier events with explicit authority and audit rules.

reconciliationbookingpayment
Explore →
distribution-api

Hotelbeds API Suite: Bedbank Distribution Profile

developer.hotelbeds.com

A technical profile of the HBX Group Hotelbeds API Suite covering hotel booking, content and cache APIs for B2B accommodation distribution.

hotelbedshbxbedbank
Explore →
distribution

OTA vs Metasearch vs Travel Marketplace: Key Differences

Compare OTA, metasearch and travel-marketplace models by transaction ownership, supplier relationships, monetization, handoff and technical architecture.

otametasearchtravel-marketplace
Explore →
distribution

Package Holiday vs Hotel Metasearch: Architecture Differences

Compare package-holiday distribution with hotel metasearch by offer identity, pricing, supplier topology, booking ownership and cancellation.

package-holidayhotel-metasearchtour-operator
Explore →
distribution-api

Sabre Travel APIs: GDS and Travel Distribution Profile

developer.sabre.com

A technical profile of Sabre Travel APIs covering air, lodging, car, booking and agency workflows across a GDS-oriented B2B platform.

sabregdsflight-api
Explore →