Process 05 — payment-saga happy path
Process 05 — payment-saga happy path
Section titled “Process 05 — payment-saga happy path”Successful flow: auction closes → top bidder’s saved card charges first try (no 3DS) → invoice issued → ad activates at T+24h.
Key invariants on the happy path
instance_idis exactlyauction_idthroughout.- Every Stripe call has
Idempotency-Key: ${saga_instance_id}:${step}:${attempt}with attempt=1. - The webhook bridge only signals; it does not write to D1.
invoices.retrieveis called at the top of the post-event step to guard against the bridge having lost the payload.- Total wall-clock on a fully successful run: dominated by
step.sleepUntil(T+24h); CPU work is < 5s.