Skip to content

PayPal sandbox only. No real money moves.

ReferenceReference

Saga states and events

Every state and every legal move of the settlement saga, from the transition table in the code.

Verifiedbacked by a real run or committed evidence

Page last changed 7 Nov 2026 (from the git history)

The table below is TRANSITIONS in packages/payments/src/saga/machine.ts. Any event outside it throws IllegalTransition. TERMINAL_STATES are SETTLED and FAILED_NEEDS_REVIEW.

EventFromTo
start_auctionHELDBIDDING
cancelHELD, BIDDINGVOIDING
hammerBIDDINGWINNER_SELECTED
no_candidateWINNER_SELECTEDVOIDING
beginWINNER_SELECTEDCAPTURING
capture_ok, adoptedCAPTURINGCAPTURED
definite_failCAPTURINGFALLBACK_RUNNER_UP
next_candidateFALLBACK_RUNNER_UPCAPTURING
no_candidates_leftFALLBACK_RUNNER_UPVOIDING
begin_voidCAPTUREDVOIDING
all_releasedVOIDINGSETTLED
invariantWINNER_SELECTED, CAPTURING, FALLBACK_RUNNER_UPFAILED_NEEDS_REVIEW
unknown_deadlineCAPTURINGFAILED_NEEDS_REVIEW
mismatchCAPTURING, CAPTUREDFAILED_NEEDS_REVIEW
void_budget_exhaustedVOIDINGFAILED_NEEDS_REVIEW

Effects

A transition can return effects that the runner executes after it saves the journal: capture (cursor, bidder, hold, authorization id, amount), void_holds (every hold except the winner's, sorted by id) and flag_review (with a reason).

Crash boundaries

The runner reports a boundary at every save (journaled:<event>) and around each PayPal call: before:capture, after:capture, before:get, after:get, after:void. The simulation and the GAVEL_CHECKPOINT_KILL test hook use these labels.

Edit on GitHub

Last updated on