---
id: TST-ACC-TRX-018
title: Stripe 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/stripe.e2e.spec.js
implements: []
implements_parts: []
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/stripe.e2e.spec.js'
evidence:
  - provenance: test
    source: 'services-accounting:modules/transactions/tests/e2e/stripe.e2e.spec.js'
    assertion_titles:
      - the Stripe routes (end to end)
      - a caller without the route’s permission
      - >-
        is refused the client-side info, the SetupIntent and the settings routes
        (403)
      - the public webhook
      - acknowledges an anonymous POST with no event id as received and ignored
      - the Payment Element with the dummy in force
      - >-
        names the dummy as the provider and the processor, with no publishable
        key
      - answers the same body on the Stripe-named alias
      - >-
        answers a SetupIntent of the dummy’s for a contact, and refuses an
        unknown mode (400)
      - 'the pop-up’s mount information through the gateway, for a Payrix session'
      - >-
        answers the session key with PayFields’ parameters on the new route and
        on the alias
      - >-
        answers the kinds the gateway accepted for ?mode=both, and refuses an
        unknown mode (400)
      - >-
        answers the card alone for ?mode=both on a Payrix account whose
        installation has electronic checks off
      - the context the pop-up names for a merchant account
      - names the account’s unit and resource ref (the info route)
      - >-
        names the account on the alias too, and on a SetupIntent whose body
        names it
      - >-
        names no account when the pop-up is opened without one: the tenant’s
        resolution
      - >-
        refuses a SetupIntent for a merchant account the tenant does not have
        (404)
      - >-
        refuses a merchant account the tenant does not have (404) and an unknown
        query parameter (400)
      - the settings
      - >-
        reads the defaults at version 0, saves the options and reads them back
        at version 1
      - >-
        refuses a primary account that is not a Stripe merchant account’s of the
        tenant, and a malformed one (400)
    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');
      - >-
        const { localIntegrationTransport, stubInvokeResult } =
        require('@rhythmsoftware/integration-client/local');
      - >-
        const { useIntegrationInvokeOptionsForTests } =
        require('../../services/payments/integrations-processor');
      - 'const { sql } = require(''drizzle-orm'');'
      - >-
        const { createMerchantAccount } =
        require('../../../books/services/persistence/merchant-accounts');
      - '} = require(''../integration/payments-fixtures'');'
      - "\t\t\t...(anonymous ? {} : { ctx: ctx ?? session.require().administrator }),"
      - "\t\t\tconst { outsider } = session.require();"
      - "\t\t\tsession.require();"
      - "\t\t\tsession.require();"
      - "\t\t\t\tsession.require();"
    test_double_declarations: []
---

# Stripe 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

The executable assertions exercise this module, but no capability or feature scenario binding is established for this file. Its individual assertion titles remain in the evidence register for subsequent mapping.

## 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.
