Zum Inhalt springen

Process 05 — payment-saga cascade

Charge fails on the top bidder → strike increment → fall through ranked list (top 2..5) → ultimately house-ad if exhausted.

A failed payment records a strike and advances to the next ranked bidder with fresh idempotency keys. A bidder needing authentication receives a timed email link. Successful payment proceeds to activation, while exhausting the ranked list schedules a house ad.A failed payment records a strike and advances to the next ranked bidder with fresh idempotency keys. A bidder needing authentication receives a timed email link. Successful payment proceeds to activation, while exhausting the ranked list schedules a house ad.

Cascade invariants

  • instance_id stays auction_id across all cascade iterations — no sub-workflows spawned.
  • Stripe Idempotency-Key increments via the attempt counter; never reuses keys across users.
  • Workflow step.do names are unique per attempt: invoice-create:attempt-2:user-u2. Replay safety is preserved by name uniqueness.
  • Strike API is idempotent on (saga_instance_id, user_id) so workflow restarts mid-strike are safe.
  • First attempt uses 6h SCA window; cascaded attempts use 30min to stay within 24h pre-activate budget.
  • Max 5 attempts → guaranteed HOUSE_AD fallback before slot time.