Skip to content

CAP-ACC-TRX-007Collect processor payments and resolve uncertainty

Markdown

CAP-ACC-TRX-007

Collect processor payments and resolve uncertainty

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaAccountingModuleTransactionsRevision1

Read atservices-accounting f47cb263react-console baf6dae3

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Staff and Commerce collect card or bank money and recover interrupted outcomes without a second charge.Exhausted lookup raises human review rather than assuming no charge occurred. Bank-debit clearing can finish later than the original tender.
Surfaces
consoleapijob
Intent sources
services-accounting:docs/milestones/plans/ACCT-M2-plan.md#D5services-accounting:docs/milestones/plans/ACCT-M2-plan.md#D6services-accounting:docs/milestones/plans/ACCT-M2-plan.md#13. Amendment 2026-10-21 18:55 ET: Payrix beside Stripe (Andrew)services-accounting:docs/milestones/ACCT-M2-take-and-apply-payments.md#WP-U/U2/U3services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-13services-accounting:docs/architecture/accounting-2.0/02-decisions.md#M2-10

Controls

44 controls apply, from the corpus control catalogue.

TC-IAM-001 TC-IAM-002 TC-IAM-003 TC-IAM-004 TC-IAM-005 TC-IAM-006 TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-AZ-005 TC-AZ-006 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-TEN-004 TC-SEC-001 TC-SEC-002 TC-SEC-003 TC-SEC-004 TC-CRY-001 TC-DAT-001 TC-DAT-002 TC-DAT-003 TC-LOG-001 TC-LOG-002 TC-LOG-003 TC-LOG-004 TC-LOG-005 TC-AVL-001 TC-AVL-004 TC-MON-001 TC-MON-002 TC-MON-004 TC-PI-001 TC-PI-002 TC-PI-003 TC-PI-004 TC-PI-005 TC-VEN-001 TC-VEN-002 TC-VEN-003 TC-PRV-001 TC-PRV-002

Permissions

KeyChecked atScope
accounting.payments.createapitenant
accounting.payments.readapitenant
accounting.payments.updateapitenant
accounting.payments.settleapiglobal
accounting.payment-element.readapitenant
accounting.payment-element.createapitenant
accounting.stripe-settings.readapitenant
accounting.stripe-settings.updateapitenant

Business Rules

14 rules, 13 to be proved before approval. A rule's product intent is derived from its origin: 1 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
Processor tenders require an active merchant account in the payment’s unit and currency; hosted processor fields collect the instrument, and Accounting does not retain its token.
validationapi, servicetest
services-accounting:modules/transactions/tests/integration/services/payments/tender.integration.spec.js#it refuses an inactive merchant account (merchant_account_inactive), charging nothing
02must prove
Proposed
Financial eligibility and planned allocations are checked before the charge call, preventing rejected input from reaching the processor.
validationservicetest
services-accounting:modules/transactions/tests/integration/services/payments/tender.integration.spec.js#it refuses a planned allocation over the line’s balance (over_application), charging nothing
03must prove
Confirmed
An intent is committed before charging, and its identity limits the attempt to one charge and one recorded payment.
invariantservice, databasetest
services-accounting:modules/transactions/tests/integration/services/payments/tender.integration.spec.js#it resolves the intent succeeded, naming the payment, claimed and resolved, with the batch chosen at initiation
04must prove
Proposed
A definite decline or unreachable charge fails the intent and releases the request key for another attempt without recording collected money.
lifecycleservicetest
services-accounting:modules/transactions/tests/integration/services/payments/tender.integration.spec.js#it frees the key: the same key sent again is tendered again, as a new intent (declined again here)
05must prove
Proposed
Captured money is always recorded, allocations shrink to the lines’ current balances, and excess remains unapplied.
policyservicetest
services-accounting:modules/transactions/tests/integration/services/payments/tender.integration.spec.js#it is capped at what the line owes then and the rest stays unapplied: the charged money is never refused
06must prove
Proposed
An uncertain processor response leaves the intent processing, and retrying the request performs a lookup instead of another charge.
lifecycleservicetest
services-accounting:modules/transactions/tests/integration/services/payments/tender.integration.spec.js#it answers the payment to a replay of the same key, from what the processor holds, with no second charge
07must prove
Proposed
Scheduled lookups follow the environment cadence and require a definite answer; exhausted unresolved lookups raise an attention item for human review.
lifecycleservicetest
services-accounting:modules/transactions/tests/integration/services/payments/lost-answers.integration.spec.js#it hands the intent to a person at the last lookup: needs_review, the item published with its facts
08must prove
Proposed
Human resolution requires an unresolved attempt already in review and either records failure or creates the payment once using the confirmed processor reference.
permissionapi, servicetest
services-accounting:modules/transactions/tests/integration/services/payments/lost-answers.integration.spec.js#it refuses both decisions before the last lookup (lost_answer_not_in_review)
09must prove
Proposed
An intent whose processor cannot be queried is abandoned after twenty-four hours and logged as an error.
lifecycleservicetest
services-accounting:modules/transactions/tests/integration/services/payments/tender.integration.spec.js#it is abandoned by the sweeper after 24 hours, with its event (FC-17)
10must prove
Proposed
Electronic checks remain pending until clearing is confirmed, then succeed; a returned debit creates an ACH-return reversal.
lifecycleservicetest
services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it settles the one the bank cleared: succeeded, settled_at, its capture item eligible, the settle event
11must prove
Proposed
Only Rhythm staff can use the system route to mark an electronic check settled; customer administrators are refused.
permissionapitest
services-accounting:modules/transactions/tests/e2e/payment-reversals.e2e.spec.js#it is refused the settled route as a console administrator: it is a system route (403)
12must prove
Proposed
The processor’s electronic-check capability controls whether bank-account entry appears beside card entry, and electronic checks are eligible wherever cards are.
origin: services-accounting:docs/milestones/plans/ACCT-M2-plan.md#13. Amendment 2026-10-21 18:55 ET: Payrix beside Stripe (Andrew)
policyservicetest
services-accounting:modules/transactions/tests/integration/services/stripe/payment-client-side-info.integration.spec.js#it offers the card alone for mode both when the installation has electronic checks off: asked again once, no failure
13must prove
Proposed
Card captures create reconciliation items immediately, while bank-debit captures become eligible when clearing completes.
invariantservicetest
services-accounting:modules/transactions/tests/integration/services/payments/tender.integration.spec.js#it records the capture as one eligible settlement item keyed payment:<id>:capture, on Stripe’s timing (the account names no processor)
14
Proposed
Production processor work uses the Integration Platform gateway; the superseded Stripe options and webhook remain exposed and report missing configuration where keys are absent.
policyservicedocumented

Scenarios

IdGivenWhenThenProvenance
01Staff receive Visa details from a member by phone.Use hosted payment entry to collect against the invoice.The recorded intent produces one capture and a numbered allocated receipt.test
02A charge completed externally but its response did not arrive.Resubmit the uncertain request using the same key.Lookup recovers the existing charge and records its payment without charging again.test
03The selected merchant destination uses Payrix.Submit a card token that declines, then retry.The payment dialog explains the failure and obtains a new session for the next attempt.test

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.