---
id: TST-ACC-TRX-077
title: Payment batch facts suite
kind: integration
product_area: accounting
module: transactions
revision: 1
status: draft
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
repository: services-accounting
files:
  - >-
    modules/transactions/tests/integration/services/payments/payment-batch-facts.integration.spec.js
implements:
  - ATS-ACC-TRX-006-04
implements_parts:
  - scenario: ATS-ACC-TRX-006-04
    assertion: >-
      it puts a check that names no batch in the rule’s active batch, and a card
      in the default’s
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-batch-facts.integration.spec.js#it
      puts a check that names no batch in the rule’s active batch, and a card in
      the default’s
  - scenario: ATS-ACC-TRX-006-04
    assertion: 'it keeps the batch a payment names, rules or not'
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-batch-facts.integration.spec.js#it
      keeps the batch a payment names, rules or not
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 3
isolation: >-
  Suite-marked records in the prepared local test database; fixture teardown
  removes owned records.
provenance: test
source: >-
  services-accounting:modules/transactions/tests/integration/services/payments/payment-batch-facts.integration.spec.js
evidence:
  - provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-batch-facts.integration.spec.js
    assertion_titles:
      - a payment’s batch chosen by its facts (integration)
      - >-
        puts a check that names no batch in the rule’s active batch, and a card
        in the default’s
      - >-
        puts a refund of the check that names no batch in the rule’s batch too
        (its bank account and payment type are the check’s)
      - 'keeps the batch a payment names, rules or not'
    imports:
      - 'const { sql } = require(''drizzle-orm'');'
      - 'const { stage } = require(''@rhythmsoftware/macroservice-testing/stage'');'
      - >-
        const { saveBatchAssignmentSettings } =
        require('../../../../../batches/services/persistence/batch-assignment-settings');
      - >-
        const { createRecurringBatch } =
        require('../../../../../batches/services/persistence/recurring-batches');
      - >-
        const { receivePayment } =
        require('../../../../services/payments/payment-receive');
      - >-
        const { executeRefund, requestRefund } =
        require('../../../../services/refunds/refund-commands');
      - '} = require(''../../payments-fixtures'');'
      - "\t\tworld.require();"
      - "\t\tworld.require();"
      - "\t\tworld.require();"
    test_double_declarations: []
---

# Payment batch facts suite

## Verification Boundary

The suite exercises transaction commands and database protections in the local prepared test environment. Registration records the existing executable file; it does not report a run or establish product approval.

## What This Suite Proves

Its cited assertions contribute evidence for receipt batching follows explicit or assigned choice. The structured assertion bindings identify which parts of combined scenarios it executes.

## What It Does Not Prove

Local commands and route invocations do not establish deployed routing, live processor guarantees or the complete staff browser experience. An unbound feature chain remains proposed, and this registration carries no execution result.

## Real Dependencies and Test Doubles

The suite uses the imported commands, route handlers or persistence code against the local test database. Fixture helpers supply accounting context; any stepped clock, dummy processor or substituted external client is retained in the evidence declarations.

## Must Not Be Doubled

The command or persistence behavior under assertion and its relevant database protections must remain real. Substituting the final financial result removes evidence of transactional effects.
