---
id: STATE-MBR-MEM-010
title: Payment enforcement
object: DOM-MBR-MEM-001
product_area: membership
module: memberships
revision: 1
status: draft
design_intent: proposed
implementation_evidence: observed
source_sha:
  services-membership: 5994c270e8a37a30f848e99ba5b5ee6b87c08893
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
states:
  - name: open
    meaning: A suspend enforcement is recorded and may be holding rights.
  - name: recorded
    meaning: >-
      A notify or review enforcement is recorded without changing membership
      standing.
  - name: restored
    meaning: >-
      The enforcement has a restoration record; it no longer contributes an open
      Commerce suspension.
transitions:
  - from: open
    to: restored
    trigger: Commerce resolves a suspend enforcement.
    guard: The enforcement exists and has not already been restored.
    side_effects:
      - >-
        Record restoration; clear a Commerce suspension only without another
        open suspension or staff reason.
      - Recompute children and standing when suspension clears.
    who: Commerce
    provenance: test
    source: >-
      services-membership:modules/commerce-participant/tests/integration/participant.integration.spec.ts#suspends
      on a reversed payment, idempotently, and restores on
  - from: recorded
    to: restored
    trigger: Commerce restores a notify or review enforcement.
    guard: The named record exists and is not restored.
    side_effects:
      - Record restoration without altering membership suspension.
    who: Commerce
    provenance: observed
    source: >-
      services-membership:modules/commerce-participant/services/enforcement/enforcement.ts:restore
invalid:
  - from: restored
    to: open
    why: >-
      A restored enforcement is not reopened; another cause uses another
      enforcement identifier.
concurrency: >-
  Identifiers recognize repeated enforcement and restoration. Holding locking
  orders writes, and remaining suspension records are counted before Commerce
  clears the hold.
invariants:
  - INV-DOM-MBR-MEM-001-09
evidence:
  - >-
    services-membership at 5994c270:
    modules/commerce-participant/services/enforcement/enforcement.ts;
    db/commerce-enforcements.table.ts; db/participant-vocabularies.ts
---

# Payment enforcement

## The Lifecycle

```mermaid
stateDiagram-v2
  state open
  state recorded
  state restored
  open --> restored
  recorded --> restored
```

## Transitions Explained

Enforcement records suspend, notify or review actions. A suspend action changes rights only when the holding is not already suspended. Restoration can close any recorded enforcement, but only an eligible suspend action can clear a Commerce suspension.

## What Cannot Happen

A different restoration for an already-restored enforcement is rejected. Commerce cannot clear suspension bearing a staff reason, and line cancellation must use its own participant operation.

## Concurrency and Timing

Identifiers recognize repeated enforcement and restoration. Holding locking orders writes, and remaining suspension records are counted before Commerce clears the hold.
