---
id: WF-ACC-BKS-009
title: Seed and Verify Workspace Payment Methods
trigger: Platform invokes Accounting participants during workspace provisioning.
product_area: accounting
module: books
revision: 1
status: draft
design_intent: proposed
implementation_evidence: observed
inference: []
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
implements:
  - CAP-ACC-BKS-019
  - CAP-ACC-BKS-012
moves:
  - STATE-ACC-BKS-005
crosses: []
idempotency: >-
  One insert uses conflict-do-nothing for the protected seed identities.
  Retrying preserves previously stored methods, including renamed methods, and
  inserts only missing seeds.
concurrency: >-
  The deployed lifecycle function handles one invocation at a time. Seed
  insertion is transactional; Platform owns orchestration, retries and
  progression of workspace state.
hops:
  - 'n': 1
    actor_or_service: Platform provisioning job
    action: >-
      Return Accounting participant manifests when Platform requests the
      lifecycle description.
    anchor: >-
      services-accounting:modules/maintenance/services/lifecycle/tenant-lifecycle-operations.ts:runTenantLifecycleOperation
    seam: sync
    on_failure: Platform decides whether and when to repeat a failed description call.
    left_inconsistent: No provisioning effect follows a failed description.
    observer: The orchestration run displaying participant planning
    provenance: observed
    source: >-
      services-accounting:modules/maintenance/services/participants/registry.ts:accountingParticipantManifests
  - 'n': 2
    actor_or_service: Accounting lifecycle function
    action: >-
      Validate the lifecycle operation, participant, workspace and run identity,
      then enter the requested workspace.
    anchor: >-
      services-accounting:modules/maintenance/services/lifecycle/tenant-lifecycle-operations.ts:runTenantLifecycleOperation
    seam: sync
    on_failure: Reject malformed or unsupported requests before participant work begins.
    left_inconsistent: No participant mutation has run.
    observer: Platform's lifecycle run
    provenance: test
    source: >-
      services-accounting:modules/maintenance/tests/unit/lifecycle/tenant-lifecycle-operations.spec.js#refuses
      a reset, which Accounting does not serve
  - 'n': 3
    actor_or_service: Configuration participant
    action: >-
      Insert the five protected card, ACH, cash, paper-check and wire methods;
      other participants report no provisioning work.
    anchor: >-
      services-accounting:modules/maintenance/services/participants/configuration-participant.ts:accountingConfigurationParticipant
    seam: sync
    on_failure: Roll back a failed seed insert; a later Platform call can retry safely.
    left_inconsistent: This call leaves no partial seed set; earlier successful inserts remain.
    observer: The orchestration run’s provisioning step detail
    provenance: test
    source: >-
      services-accounting:modules/maintenance/tests/integration/services/participants/configuration-participant.integration.spec.js#answers
      provision done, having written the tenant’s five system payment methods
      (WP-01)
  - 'n': 4
    actor_or_service: Configuration participant
    action: >-
      Check which protected method identities are absent and return readiness
      with the missing list.
    anchor: >-
      services-accounting:modules/books/services/persistence/payment-methods.ts:missingSystemPaymentMethods
    seam: sync
    on_failure: >-
      Return not-ready with missing identities; Platform’s reaction is outside
      Accounting’s implementation.
    left_inconsistent: Readiness reporting changes no workspace state itself.
    observer: Platform's lifecycle run
    provenance: observed
    source: >-
      services-accounting:modules/maintenance/services/participants/configuration-participant.ts:accountingConfigurationParticipant
branches:
  - condition: Provision migrated legacy methods
    path: >-
      The migration seeding path supplies extra legacy methods separately;
      new-workspace provisioning does not add them.
waits: []
evidence:
  - >-
    services-accounting at f47cb263:
    modules/maintenance/aws/lambda/TENANT_LIFECYCLE.ts;
    aws/logic/tenant-lifecycle.lambda.ts;
    services/lifecycle/tenant-lifecycle-operations.ts;
    services/participants/registry.ts, configuration-participant.ts
  - >-
    services-accounting at f47cb263:
    modules/books/services/persistence/payment-methods.ts:provisionSystemPaymentMethods;
    db/payment-method-seeds.ts
controls: [TC-IAM-001, TC-IAM-002, TC-IAM-004, TC-IAM-005, TC-IAM-006, TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-AZ-005, TC-AZ-006, TC-TEN-001, TC-TEN-002, TC-TEN-003, TC-DAT-001, TC-LOG-001, TC-LOG-002, TC-LOG-003, TC-LOG-004, TC-PI-001, TC-PI-002, TC-PI-003, TC-PI-005]
---

# Seed and Verify Workspace Payment Methods

## What It Does

Accounting provisioning supplies the protected starting payment vocabulary. It creates no default business unit or chart. Participant calls perform one step and return results to Platform, which owns the lifecycle process.

## The Flow

```mermaid
flowchart TD
  h0["Return Accounting participant manifests when Platform requests the lifecycle description."]
  h1["Validate the lifecycle operation, participant, workspace and run identity, then enter the requested workspace."]
  h0 --> h1
  h2["Insert the five protected card, ACH, cash, paper-check and wire methods; other participants report no provisioning work."]
  h1 --> h2
  h3["Check which protected method identities are absent and return readiness with the missing list."]
  h2 --> h3
```

## When Something Fails

Invalid calls fail before participant execution. Seed insertion is one transaction, so failure cannot leave a partial set from that call. A repeated successful call preserves existing rows. Verification reports missing identities without changing state; Accounting does not implement Platform’s decision to retry or activate the workspace.

## Open Design Questions

No Accounting participant exposes reset. Whether Platform’s reset classification preserves the relevant setup needs the owning lifecycle contract rather than an inference from Accounting alone.
