A database transaction groups database operations into one commit-or-rollback unit. It makes the protected writes atomic, but does not automatically include later network calls or background work. section 7.5 section 8.5
Trace the boundary instead of assuming the user's single action is fully transactional:
- Ask whether a crash can leave data half-written. section 7.5
- Identify the exact writes protected together, such as Booking.status and BookingAudit. section 7.5
- Separate committed database state from refunds, calendar changes, webhooks, emails, and other calls that can fail afterward. section 7.5 section 8.5
Booking and cancellation flows
A cancellation transaction updates Booking.status to CANCELLED and writes its audit row together. The Stripe refund, reminder cancellation, webhook, and Google Calendar deletion occur outside that boundary, so a process crash can leave the database saying CANCELLED while the refund has not happened. In booking creation, a transactional INSERT commits the Booking row before the handler waits for Daily.co and Google Calendar; notifications run only after the 201 response. section 7.5 section 8.5
POST /api/book/event sequence. Six service lifelines, time flowing top to bottom. Everything above the 201 Created runs while the user waits; everything below fans out async.

Use the sequence diagram to distinguish work completed before the 201 response from notification work that fans out afterward. section 8.5




















