Payment Saga with Compensation

Reserve, debit, credit, notify — each with a compensating action on downstream failure

Payment Saga with Compensation Reserve, debit, credit, notify — each with a compensating action on downstream failure 01 / Forward Steps (orchestrated) EX / Compensating Actions Reserve · hold on source · Forward Steps (orchestrated) · idempotent Reserve hold on source idempotent Debit · capture the hold · Forward Steps (orchestrated) Debit capture the hold Credit · post to target · Forward Steps (orchestrated) Credit post to target Notify · confirm + settle · Forward Steps (orchestrated) · terminal Notify confirm + settle terminal Release · undo reserve · Compensating Actions Release undo reserve Refund · undo debit · Compensating Actions Refund undo debit Reverse · undo credit · Compensating Actions Reverse undo credit debit fails credit fails abort Legend User UI Agent logic Policy Tool action Context / trace

Happy Path

  • • Steps run in order behind one orchestrator
  • • Each step is idempotent and retriable
  • • Money commits only after every step acks

On Failure

  • • A failed step triggers its compensator
  • • Compensation unwinds prior steps in reverse
  • • No global lock, no distributed transaction

Guarantees

  • • Every debit has a matching refund path
  • • Compensators are idempotent and durable
  • • Funds are never left stranded mid-flight