---
id: TST-ACC-TRX-002
title: Card fees 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/card-fees.e2e.spec.js
implements:
  - ATS-ACC-TRX-001-14
implements_parts:
  - scenario: ATS-ACC-TRX-001-14
    assertion: >-
      it stamps the body’s policy on the invoice, and the unit’s default
      (optional) when the body names none
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/e2e/card-fees.e2e.spec.js#it
      stamps the body’s policy on the invoice, and the unit’s default (optional)
      when the body names none
  - scenario: ATS-ACC-TRX-001-14
    assertion: >-
      it refuses a policy that is not none, required or optional (400, the
      contract’s own refusal naming the field)
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/e2e/card-fees.e2e.spec.js#it
      refuses a policy that is not none, required or optional (400, the
      contract’s own refusal naming the field)
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/card-fees.e2e.spec.js'
evidence:
  - provenance: test
    source: 'services-accounting:modules/transactions/tests/e2e/card-fees.e2e.spec.js'
    assertion_titles:
      - the card fee over the routes (end to end)
      - the business unit route
      - >-
        answers the rule as written: the percent as a decimal string, the
        amounts as integers, the default policy
      - the invoice create route
      - >-
        stamps the body’s policy on the invoice, and the unit’s default
        (optional) when the body names none
      - >-
        refuses a policy that is not none, required or optional (400, the
        contract’s own refusal naming the field)
      - the payable description routes
      - >-
        quotes the fee for the invoice’s balance by default, for the amount
        tendered when named, and none for a check
      - quotes the customer’s totals with the fee one tender would add
      - the settle route
      - >-
        charges the invoice and the fee in one tender and answers the fee
        invoice
      - >-
        refuses a declined required fee (400 card_fee_required) and an
        accept_card_fee that is not a boolean (400)
      - the payments route
      - >-
        takes a direct card tender with the fee: the payment of 10280 allocated
        to the invoice and the fee invoice
    imports:
      - >-
        const { parseBody, proxyEvent } =
        require('@rhythmsoftware/macroservice-testing/signed-context');
      - 'const { stage } = require(''@rhythmsoftware/macroservice-testing/stage'');'
      - >-
        const { accountingApi } =
        require('../../../books/tests/e2e/e2e-security');
      - >-
        const { requireOk } =
        require('../../../books/tests/e2e/configuration-e2e-support');
      - >-
        const { createProduct } =
        require('../../../products/services/persistence/products');
      - '} = require(''../integration/payments-fixtures'');'
      - "\t\t\tctx: ctx ?? session.require().administrator,"
      - "\t\t\tconst unit = session.require().unit;"
      - "\t\t\tsession.require();"
      - "\t\t\tsession.require();"
      - "\t\t\tsession.require();"
      - "\t\t\tsession.require();"
      - "\t\t\tsession.require();"
      - "\t\t\tconst { invoice, outcome } = settled.require();"
      - "\t\t\tsession.require();"
      - "\t\t\tsession.require();"
    test_double_declarations: []
---

# Card fees 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 creation selects a valid fee policy. 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.
