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

text
Payment captured:
PENDING_PAYMENT -> PLACED

Payment failed:
PENDING_PAYMENT -> CANCELLED

Late capture after cancellation:
Issue refund

Learn this concept

Lesson 8.3 · HMAC webhooks and payment sagas

Used in exercises

Exercise 8.4 · Payment processing service Exercise 8.5 · Expo stretch integration