---
id: TST-ACC-TRX-079
title: Payment payer 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-payer.integration.spec.js
implements:
  - ATS-ACC-TRX-006-08
implements_parts:
  - scenario: ATS-ACC-TRX-006-08
    assertion: it records a CRM payer with CRM’s name as its snapshot
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-payer.integration.spec.js#it
      records a CRM payer with CRM’s name as its snapshot
  - scenario: ATS-ACC-TRX-006-08
    assertion: 'it records a payer by name alone, trimmed'
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-payer.integration.spec.js#it
      records a payer by name alone, trimmed
  - scenario: ATS-ACC-TRX-006-08
    assertion: >-
      it refuses a payer on a card payment, writing no intent:
      payer_offline_only
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-payer.integration.spec.js#it
      refuses a payer on a card payment, writing no intent: payer_offline_only
  - scenario: ATS-ACC-TRX-006-08
    assertion: 'it writes the payer once: the write-once trigger refuses a change (RHF01)'
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-payer.integration.spec.js#it
      writes the payer once: the write-once trigger refuses a change (RHF01)
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-payer.integration.spec.js
evidence:
  - provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-payer.integration.spec.js
    assertion_titles:
      - the payer on a payment (integration)
      - records a CRM payer with CRM’s name as its snapshot
      - 'records a payer by name alone, trimmed'
      - 'leaves the payer empty when the request names none: the bill-to paid'
      - 'answers the payer on the payment, and null when the bill-to paid'
      - 'refuses a payer on a card payment, writing no intent: payer_offline_only'
      - refuses a payer kind without its id
      - 'writes the payer once: the write-once trigger refuses a change (RHF01)'
      - carries the payer on the customer’s open payment items
      - >-
        counts the unapplied money another party sent in Ada’s summary: Metro’s
        and the lockbox’s, not her own
    imports:
      - 'const { sql } = require(''drizzle-orm'');'
      - 'const { stage } = require(''@rhythmsoftware/macroservice-testing/stage'');'
      - >-
        const { receivePayment } =
        require('../../../../services/payments/payment-receive');
      - >-
        const { summarizeCustomer } =
        require('../../../../services/customers/customer-summary');
      - >-
        const { listCustomerOpenItemsAsOf } =
        require('../../../../services/persistence/customer-summaries');
      - '} = require(''../../remittances-fixtures'');'
      - "\t\tconst { byParty } = paid.require();"
      - "\t\tconst { byName } = paid.require();"
      - "\t\tconst { own } = paid.require();"
      - "\t\tconst { byParty, byName, own } = paid.require();"
      - "\t\tconst { own } = paid.require();"
      - "\t\tconst { byParty, byName, own } = paid.require();"
    test_double_declarations: []
---

# Payment payer 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 payer attribution is limited and immutable. 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.
