Payment Saga
A payment saga is a sequence of local operations that coordinates payment and order records to complete a business process. In this course, a successful payment moves an order from PENDING_PAYMENT to PLACED, while a failed payment moves it to CANCELLED, with compensating actions handling outcomes that arrive after an earlier operation has committed.
Minimal example
Payment captured:
PENDING_PAYMENT -> PLACED
Payment failed:
PENDING_PAYMENT -> CANCELLED
Late capture after cancellation:
Issue refund