Skip to content

Wipe flow

Wiping a business deletes its footprint across the external systems, streaming progress over SSE. The external deletions have system-specific gotchas.

sequenceDiagram
    actor Admin
    participant Portal as portal (admin)
    participant API as scheduler-api
    participant ST as Stripe
    participant WO as WorkOS
    participant R as Redis (SSE)

    Admin->>Portal: wipe business (confirm)
    Portal->>API: start wipe
    API->>R: progress: started
    API->>ST: close account (v2/core/accounts)
    API->>WO: delete organization
    API->>API: delete scheduler rows + caches
    API->>R: progress: per-step ok / error
    R-->>Portal: SSE progress (stoken)
  • Stripe V2 accounts must be closed via v2/core/accountsnot the v1 delete call.
  • The WorkOS “Test Organization” fixture is un-deletable and must be ignored rather than retried.
  • Failures surface via progress.error on the SSE stream and in scheduler-worker logs — the wipe does not silently swallow them.

Reference: the wipe deletion notes in repo memory / ops docs.