---
id: TST-ACC-TRX-014
title: Remittances suite
kind: api-lifecycle
product_area: accounting
module: transactions
revision: 1
status: draft
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
repository: services-accounting
files:
  - modules/transactions/tests/e2e/remittances.e2e.spec.js
implements:
  - ATS-ACC-TRX-010-01
  - ATS-ACC-TRX-010-05
implements_parts:
  - scenario: ATS-ACC-TRX-010-01
    assertion: >-
      it is refused recording and voiding as a reader, and reading as one
      without the payments’ key (403)
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/e2e/remittances.e2e.spec.js#it
      is refused recording and voiding as a reader, and reading as one without
      the payments’ key (403)
  - scenario: ATS-ACC-TRX-010-05
    assertion: >-
      it records three payments, the members’ allocated and the remainder
      unapplied on Metro Transit, each paid by Metro
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/e2e/remittances.e2e.spec.js#it
      records three payments, the members’ allocated and the remainder unapplied
      on Metro Transit, each paid by Metro
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/e2e/remittances.e2e.spec.js'
evidence:
  - provenance: test
    source: 'services-accounting:modules/transactions/tests/e2e/remittances.e2e.spec.js'
    assertion_titles:
      - the remittance routes (end to end)
      - a caller without the route’s permission
      - >-
        is refused recording and voiding as a reader, and reading as one without
        the payments’ key (403)
      - tenancy
      - >-
        answers another tenant’s remittance 404 exactly as one that does not
        exist
      - 'a body the contract refuses, before any command runs'
      - >-
        refuses a line naming neither an invoice nor a line, and a remittance
        without its key (400)
      - the remittance
      - >-
        pre-filled from the two invoices expected from Metro Transit, each owing
        180.00 (premise)
      - >-
        records three payments, the members’ allocated and the remainder
        unapplied on Metro Transit, each paid by Metro
      - >-
        replays the same key and body as the same remittance, lists it by its
        reference and reads it back
      - >-
        voids it and its payments, and refuses a second void (409
        remittance_not_recorded)
    imports:
      - >-
        const { parseBody, proxyEvent } =
        require('@rhythmsoftware/macroservice-testing/signed-context');
      - 'const { stage } = require(''@rhythmsoftware/macroservice-testing/stage'');'
      - >-
        const { accountingApi, accountingGrant } =
        require('../../../books/tests/e2e/e2e-security');
      - >-
        const { PERMISSION_MISSING, accessRefusalOf, requireOk } =
        require('../../../books/tests/e2e/configuration-e2e-support');
      - '} = require(''../integration/remittances-fixtures'');'
      - "\t\t\tctx: ctx ?? session.require().administrator,"
      - "\t\tconst { foreignInvoice } = session.require();"
      - "\t\t\tconst { reader, outsider } = session.require();"
      - "\t\t\tconst { lines, remittance } = recorded.require();"
      - "\t\t\tconst answers = [await call('GET', REMITTANCE, { id: NO_SUCH }), await call('GET', REMITTANCE, { id: foreign.require().id })];"
      - "\t\t\tconst { lines } = recorded.require();"
      - "\t\t\tconst { expected } = recorded.require();"
      - "\t\t\tconst { remittance } = recorded.require();"
      - "\t\t\tconst { lines, remittance } = recorded.require();"
      - "\t\t\tconst { remittance } = recorded.require();"
    test_double_declarations: []
---

# Remittances 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 remittance authority also requires payment access; employer excess stays with the employer. 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.
