Booking workflow and partner boundary design
Context
Used when product-critical flows depend on partner APIs that are slower or less reliable than the user-facing booking experience. It solves the problem of keeping frontend progress and backend truth aligned even when external systems respond late or inconsistently.
Key idea
Treat booking state as the source of truth, and push partner variability behind explicit async recovery boundaries.
Tradeoff
This makes the backend stricter in ways product teams feel. Booking can no longer be treated as one clean success state, and this is where teams get stuck: API validation, queue retries, partner callbacks, and recovery tooling can all disagree for a while.
Failure reality
In production, a partner API times out but still creates the reservation on its side. The retry creates a second reservation, then the original callback arrives late and overwrites the local status again. The user saw one spinner and one success screen, support sees conflicting states across screens, and engineers check logs that do not line up cleanly with partner timestamps. Without a clear local source of truth, teams end up guessing whether to retry, compensate, or tell the user to wait.
Production note
This pattern is common in marketplace and integration-heavy systems where conversion depends on not exposing partner instability directly to the user journey.
Related reading
flowchart LR
A[User Booking Flow] --> B[Frontend Client]
B --> C[Booking API]
C --> D[Validation & Pricing Rules]
D --> E[(Booking Data)]
C -. retry jobs .-> F[Background Workers]
F --> G[Partner API Connectors]
G --> H[Partner Systems]
F --> I[Status Sync & Recovery]Legend
Solid arrows: primary booking path
Dashed arrows: partner sync and retries
Rounded nodes: user-facing steps
Booking API
Owns the booking contract. Without it, frontend code and partner adapters each invent their own rules for what 'confirmed', 'pending', or 'failed' means.
Background workers
Keep partner latency and retry behavior out of the user request. Without them, the booking path either blocks on third parties or exposes transient partner failure directly to the customer.
Status sync
Reconciles local and partner state after retries, callbacks, or delayed confirmations. Without it, duplicate charges, stale booking status, and support ambiguity become normal.