---
id: ATS-ACC-REC-005
scope: CAP-ACC-REC-005
product_area: accounting
module: reconciliation
revision: 3
status: proposed
approved_by: null
approved_at: null
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
scenarios:
  - id: ATS-ACC-REC-005-01
    title: Effect records share the payment transaction
    level: api
    proves:
      - BR-CAP-ACC-REC-005-01
    preconditions: A payment transaction is open.
    steps: 'Record and commit an item, record and roll back another, then record without a transaction.'
    expected: 'Commit keeps the item, rollback removes it and the outside call is refused.'
    negative: true
    data_needs: Provide settlement world for this case.
    bound_to:
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#records
        the item inside the transaction
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#leaves
        no row once the caller’s transaction rolls back
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#refuses
        outside a transaction
      - TST-ACC-REC-078
    provenance: test
    source: >-
      services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#records
      the item inside the transaction
    category: invariant
  - id: ATS-ACC-REC-005-02
    title: Effect-key identity and mismatch
    level: api
    proves:
      - BR-CAP-ACC-REC-005-02
    preconditions: One item is recorded under an effect key.
    steps: Record the same effect again and reuse its key for another amount.
    expected: Replay returns the original without another row; changed money fails.
    negative: true
    data_needs: No additional fixture beyond the case setup.
    bound_to:
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#answers
        the first item with created false
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#leaves
        one row
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#refuses
        the same key for another amount
      - >-
        services-accounting:modules/reconciliation/tests/integration/db/settlement-items.table.integration.spec.js#refuses
        a second item with the same source key (INV-10)
      - TST-ACC-REC-078
      - TST-ACC-REC-047
    provenance: test
    source: >-
      services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#answers
      the first item with created false
    category: rule
  - id: ATS-ACC-REC-005-03
    title: Kind-specific signs
    level: api
    proves:
      - BR-CAP-ACC-REC-005-03
    preconditions: No persisted setup is required for sign calculation.
    steps: 'Evaluate positive, negative and zero amounts for every item kind and representative table writes.'
    expected: 'Only each kind’s allowed sign passes, with zero adjustments rejected.'
    negative: true
    data_needs: No additional fixture beyond the case setup.
    bound_to:
      - >-
        services-accounting:modules/reconciliation/tests/unit/rules/item-kinds.spec.js#refuses a negative
        capture
      - 'services-accounting:modules/reconciliation/tests/unit/rules/item-kinds.spec.js#refuses a positive fee'
      - >-
        services-accounting:modules/reconciliation/tests/unit/rules/item-kinds.spec.js#refuses a zero
        adjustment
      - >-
        services-accounting:modules/reconciliation/tests/integration/db/settlement-items.table.integration.spec.js#refuses
        a negative capture
      - >-
        services-accounting:modules/reconciliation/tests/integration/db/settlement-items.table.integration.spec.js#refuses
        a positive refund
      - >-
        services-accounting:modules/reconciliation/tests/integration/db/settlement-items.table.integration.spec.js#refuses
        a zero adjustment
      - TST-ACC-REC-085
      - TST-ACC-REC-047
    provenance: test
    source: >-
      services-accounting:modules/reconciliation/tests/unit/rules/item-kinds.spec.js#refuses a negative
      capture
    category: validation
  - id: ATS-ACC-REC-005-04
    title: Item context and one causing document
    level: api
    proves:
      - BR-CAP-ACC-REC-005-04
    preconditions: Two units and currencies have configured merchants.
    steps: 'Record a wrong-unit merchant, wrong currency, conflicting processor and two-document item.'
    expected: Each request identifies the conflict without writing an item.
    negative: true
    data_needs: Configure both business units used by the case.
    bound_to:
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#refuses
        another unit’s merchant account, naming the merchant account
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#refuses
        another currency than the merchant account’s, naming the currency
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#refuses
        another processor than the merchant account’s, naming the processor
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#refuses
        an item naming two documents
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#writes
        no row for a refused item
      - TST-ACC-REC-078
    provenance: test
    source: >-
      services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#refuses
      another unit’s merchant account, naming the merchant account
    category: validation
  - id: ATS-ACC-REC-005-05
    title: Business-day timing boundaries
    level: api
    proves:
      - BR-CAP-ACC-REC-005-05
      - BR-CAP-ACC-REC-005-06
      - BR-CAP-ACC-REC-005-07
    preconditions: 'Captures surround the evening cut-off, weekends and a bank holiday.'
    steps: 'Calculate and record eligibility under the supplied zones, calendars and merchant overrides.'
    expected: 'Cut-off, roll-forward and lead-time cases produce their expected local business days.'
    negative: false
    data_needs: Provide Federal Reserve calendar for this case.
    bound_to:
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#records
        a capture at 11:00 Eastern on Tuesday, eligible that day and expected Thursday, every field answered
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#records
        a capture after the 21:00 cut-off as eligible the next business day
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#records
        a capture exactly at the 21:00 cut-off as eligible that day
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#records
        a capture on Friday after the cut-off as eligible Tuesday, past the Columbus Day holiday
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#uses
        the merchant account’s own lead time and cut-off over the processor’s
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#counts
        business days in the merchant account’s own calendar
      - >-
        services-accounting:modules/reconciliation/tests/unit/rules/business-days.spec.js#moves a capture one
        second after the cut-off to the next business day
      - >-
        services-accounting:modules/reconciliation/tests/unit/rules/business-days.spec.js#is true for Friday
        2026-07-03, since a Saturday holiday is not moved
      - TST-ACC-REC-078
      - TST-ACC-REC-084
    provenance: test
    source: >-
      services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#records
      a capture at 11:00 Eastern on Tuesday, eligible that day and expected Thursday, every field answered
    category: boundary
  - id: ATS-ACC-REC-005-06
    title: Pending check clearing fills dates once
    level: api
    proves:
      - BR-CAP-ACC-REC-005-08
    preconditions: An electronic check has not cleared.
    steps: 'Record it pending, mark it cleared and repeat the mark.'
    expected: 'Dates start empty, then reflect the four-business-day lead and remain unchanged on repeat.'
    negative: false
    data_needs: No additional fixture beyond the case setup.
    bound_to:
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#records
        it with no dates
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#marks
        it eligible that day, expected four business days later past Columbus Day
      - >-
        services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#answers
        a second mark unchanged
      - TST-ACC-REC-078
    provenance: test
    source: >-
      services-accounting:modules/reconciliation/tests/integration/services/settlement-items/settlement-item-recording.integration.spec.js#records
      it with no dates
    category: transition
  - id: ATS-ACC-REC-005-07
    title: Write-once settlement facts
    level: api
    proves:
      - BR-CAP-ACC-REC-005-09
    preconditions: A settlement item exists.
    steps: 'Change amount or kind, fill then replace a processor reference and attempt deletion.'
    expected: Financial changes and deletion fail; a reference can be filled once only.
    negative: true
    data_needs: No additional fixture beyond the case setup.
    bound_to:
      - >-
        services-accounting:modules/reconciliation/tests/integration/db/settlement-items.table.integration.spec.js#refuses
        a change to the amount (write-once)
      - >-
        services-accounting:modules/reconciliation/tests/integration/db/settlement-items.table.integration.spec.js#refuses
        a change to the kind (write-once)
      - >-
        services-accounting:modules/reconciliation/tests/integration/db/settlement-items.table.integration.spec.js#fills
        in a processor payout reference once evidence names it
      - >-
        services-accounting:modules/reconciliation/tests/integration/db/settlement-items.table.integration.spec.js#refuses
        to change a processor payout reference once set
      - >-
        services-accounting:modules/reconciliation/tests/integration/db/settlement-items.table.integration.spec.js#refuses
        the application role a delete (no DELETE privilege)
      - >-
        services-accounting:modules/reconciliation/tests/integration/db/settlement-item-evidence-links.table.integration.spec.js#refuses
        the same kind and reference twice for one item
      - >-
        services-accounting:modules/reconciliation/tests/integration/db/settlement-item-evidence-links.table.integration.spec.js#refuses
        even the owner an UPDATE, by the append-only trigger (RHF32)
      - TST-ACC-REC-047
      - TST-ACC-REC-046
    provenance: test
    source: >-
      services-accounting:modules/reconciliation/tests/integration/db/settlement-items.table.integration.spec.js#refuses
      a change to the amount (write-once)
    category: invariant
  - id: ATS-ACC-REC-005-08
    title: Seeded timing data are read-only
    level: api
    proves:
      - BR-CAP-ACC-REC-005-11
    preconditions: Bank calendars and processor timing seeds are installed.
    steps: Read the seeds and try application writes or an out-of-range lead.
    expected: Expected holidays and timing rows are readable; writes and excessive lead values fail.
    negative: true
    data_needs: No additional fixture beyond the case setup.
    bound_to:
      - >-
        services-accounting:modules/reconciliation/tests/integration/db/bank-holidays.table.integration.spec.js#holds
        the Federal Reserve’s 22 holidays of 2026 and 2027 as observed, readable by the application role
      - >-
        services-accounting:modules/reconciliation/tests/integration/db/bank-holidays.table.integration.spec.js#is
        refused an INSERT (only SELECT is granted)
      - >-
        services-accounting:modules/reconciliation/tests/integration/db/settlement-lead-times.table.integration.spec.js#holds
        the four seeded lead times, ordered by processor then method, readable by the application role
      - >-
        services-accounting:modules/reconciliation/tests/integration/db/settlement-lead-times.table.integration.spec.js#refuses
        a lead of 31 business days
      - TST-ACC-REC-030
      - TST-ACC-REC-048
    provenance: test
    source: >-
      services-accounting:modules/reconciliation/tests/integration/db/bank-holidays.table.integration.spec.js#holds
      the Federal Reserve’s 22 holidays of 2026 and 2027 as observed, readable by the application role
    category: boundary
  - id: ATS-ACC-REC-005-09
    title: Payment effects cannot be entered manually
    level: api
    proves:
      - BR-CAP-ACC-REC-005-12
    preconditions: An open reconciliation is available.
    steps: Attempt a manual capture insert.
    expected: The payment-only kind is refused.
    negative: true
    data_needs: No additional fixture beyond the case setup.
    bound_to:
      - >-
        services-accounting:modules/reconciliation/tests/integration/db/settlement-items.table.integration.spec.js#refuses
        a manual capture: a person enters fees, reserves and adjustments only
      - TST-ACC-REC-047
    provenance: test
    source: >-
      services-accounting:modules/reconciliation/tests/integration/db/settlement-items.table.integration.spec.js#refuses
      a manual capture: a person enters fees, reserves and adjustments only
    category: validation
  - id: ATS-ACC-REC-005-10
    title: Existing dates survive timing changes
    level: api
    proves:
      - BR-CAP-ACC-REC-005-10
    preconditions: Existing items use a zero-day lead.
    steps: 'Change the merchant lead, reread old items and record a new capture.'
    expected: Old dates remain fixed and the new item uses the revised policy.
    negative: false
    data_needs: Provide merchant account override for this case.
    bound_to: []
    provenance: proposed
    source: 'services-accounting:docs/reconciliation/architecture.md#12.2 Expected settlement date'
    category: interaction
  - id: ATS-ACC-REC-005-11
    title: Missing timing and reserved effect keys
    level: api
    proves:
      - BR-CAP-ACC-REC-005-13
    preconditions: A merchant lacks usable lead and cut-off defaults.
    steps: Record an eligible effect and attempt a source key reserved for manual entry.
    expected: Both invalid recordings fail without an item.
    negative: true
    data_needs: Provide Isolated records for the cases described for this case.
    bound_to: []
    provenance: proposed
    source: 'services-accounting:modules/reconciliation/services/settlement-items/settlement-item-recording.ts'
    category: failure
  - id: ATS-ACC-REC-005-12
    title: Saved timing determines outstanding aging
    category: interaction
    level: api
    proves:
      - BR-CAP-ACC-REC-005-05
      - BR-CAP-ACC-REC-005-06
      - BR-CAP-ACC-REC-005-07
      - BR-CAP-ACC-REC-006-02
      - BR-CAP-ACC-REC-006-03
    interacts_with:
      - CAP-ACC-REC-006
    relies_on:
      - ATS-ACC-REC-005-05
      - ATS-ACC-REC-006-02
    preconditions: Use one isolated workspace with the financial records and caller roles required by the relied-on cases.
    steps:
      - do: Record a capture around a holiday cut-off and inspect standing at arrival and beyond grace.
        expect: The saved expected day drives aging without changing the capture amount.
        provenance: proposed
        source:
          - >-
            specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-005-capture-every-money-movement-a-processor-should-pay-out-with.md
          - >-
            specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-006-see-what-money-is-in-transit-late-or-missing.md
    expected: The saved expected day drives aging without changing the capture amount.
    negative: false
    data_needs: >-
      Local merchant and bank accounts, an open operational batch and distinct preparation and approval
      callers.
    bound_to: []
    provenance: proposed
    source:
      - >-
        specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-005-capture-every-money-movement-a-processor-should-pay-out-with.md
      - >-
        specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-006-see-what-money-is-in-transit-late-or-missing.md
  - id: ATS-ACC-REC-005-13
    title: Clearing changes candidate eligibility
    category: interaction
    level: api
    proves:
      - BR-CAP-ACC-REC-005-08
      - BR-CAP-ACC-REC-008-04
    interacts_with:
      - CAP-ACC-REC-008
    relies_on:
      - ATS-ACC-REC-005-06
      - ATS-ACC-REC-008-04
    preconditions: Use one isolated workspace with the financial records and caller roles required by the relied-on cases.
    steps:
      - do: 'Record an uncleared electronic check, inspect candidates, clear it and inspect again.'
        expect: The same effect becomes eligible for the explanation after clearing supplies its timing.
        provenance: proposed
        source:
          - >-
            specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-005-capture-every-money-movement-a-processor-should-pay-out-with.md
          - >-
            specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-008-open-a-reconciliation-over-a-deposit-and-see-what-explains.md
    expected: The same effect becomes eligible for the explanation after clearing supplies its timing.
    negative: false
    data_needs: >-
      Local merchant and bank accounts, an open operational batch and distinct preparation and approval
      callers.
    bound_to: []
    provenance: proposed
    source:
      - >-
        specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-005-capture-every-money-movement-a-processor-should-pay-out-with.md
      - >-
        specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-008-open-a-reconciliation-over-a-deposit-and-see-what-explains.md
  - id: ATS-ACC-REC-005-14
    title: Expected arrival determines detection
    category: interaction
    level: api
    proves:
      - BR-CAP-ACC-REC-005-05
      - BR-CAP-ACC-REC-005-06
      - BR-CAP-ACC-REC-005-07
      - BR-CAP-ACC-REC-017-02
      - BR-CAP-ACC-REC-017-03
      - BR-CAP-ACC-REC-017-10
    interacts_with:
      - CAP-ACC-REC-017
    relies_on:
      - ATS-ACC-REC-005-05
      - ATS-ACC-REC-017-02
    preconditions: Use one isolated workspace with the financial records and caller roles required by the relied-on cases.
    steps:
      - do: 'Record a timed capture, run detection at arrival and beyond grace, then repeat that day.'
        expect: Arrival creates no overdue concern; the later pass creates one and repeat delivery adds none.
        provenance: proposed
        source:
          - >-
            specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-005-capture-every-money-movement-a-processor-should-pay-out-with.md
          - >-
            specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-017-catch-overdue-money-stale-deposits-and-drifting-totals-every.md
    expected: Arrival creates no overdue concern; the later pass creates one and repeat delivery adds none.
    negative: false
    data_needs: >-
      Local merchant and bank accounts, an open operational batch and distinct preparation and approval
      callers.
    bound_to: []
    provenance: proposed
    source:
      - >-
        specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-005-capture-every-money-movement-a-processor-should-pay-out-with.md
      - >-
        specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-017-catch-overdue-money-stale-deposits-and-drifting-totals-every.md
evidence:
  - >-
    Bindings identify existing tests at the pinned revisions; proposed cases remain unbound and describe the
    proof still needed.
coverage:
  rule: covered
  transition: covered
  validation: covered
  permission: not-applicable
  failure: covered
  boundary: covered
  invariant: covered
  interaction: covered
  edge: 'gap: FND-ACC-REC-050'
  concurrency: 'gap: FND-ACC-REC-050'
coverage_notes:
  permission: >-
    This internal transaction participant declares no independent permission; calling workflows exercise
    authorization.
  design_completeness: >-
    Covered categories count specified cases, including proposed cases. Exhaustive state-transition,
    permission-key and domain-invariant traceability remains a separate proof gap.
---

# Track payment effects and expected processor settlement: Capability Test Specification

## Coverage

| Rule | Proved by |
|---|---|
| `BR-CAP-ACC-REC-005-01` | `ATS-ACC-REC-005-01` |
| `BR-CAP-ACC-REC-005-02` | `ATS-ACC-REC-005-02` |
| `BR-CAP-ACC-REC-005-03` | `ATS-ACC-REC-005-03` |
| `BR-CAP-ACC-REC-005-04` | `ATS-ACC-REC-005-04` |
| `BR-CAP-ACC-REC-005-05` | `ATS-ACC-REC-005-05` |
| `BR-CAP-ACC-REC-005-06` | `ATS-ACC-REC-005-05` |
| `BR-CAP-ACC-REC-005-07` | `ATS-ACC-REC-005-05` |
| `BR-CAP-ACC-REC-005-08` | `ATS-ACC-REC-005-06` |
| `BR-CAP-ACC-REC-005-09` | `ATS-ACC-REC-005-07` |
| `BR-CAP-ACC-REC-005-11` | `ATS-ACC-REC-005-08` |
| `BR-CAP-ACC-REC-005-12` | `ATS-ACC-REC-005-09` |
| `BR-CAP-ACC-REC-005-13` | `ATS-ACC-REC-005-11` |

## Interactions With Related Capabilities

Existing dates survive timing changes. Saved timing determines outstanding aging. Clearing changes candidate eligibility. Expected arrival determines detection. Proposed interaction cases require executable proof.
