---
id: ATS-ACC-TRX-013
scope: CAP-ACC-TRX-013
product_area: accounting
module: transactions
revision: 1
status: proposed
approved_by: null
approved_at: null
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
scenarios:
  - id: ATS-ACC-TRX-013-01
    title: Reversal needs authority and valid input
    level: api
    proves:
      - BR-CAP-ACC-TRX-013-01
    preconditions: The caller cannot move money.
    steps:
      - do: >-
          Attempt reversal without authority, invalid kind or missing reason,
          and unauthorized void.
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/e2e/payment-reversals.e2e.spec.js#it
          is refused the reverse route without accounting.payments.reverse and
          the reversals read without .read (403)
    expected: Access and input failures prevent mutation.
    negative: true
    data_needs: Staff permission variants.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/e2e/payment-reversals.e2e.spec.js#it
        is refused the reverse route without accounting.payments.reverse and the
        reversals read without .read (403)
      - >-
        services-accounting:modules/transactions/tests/e2e/payment-reversals.e2e.spec.js#it
        refuses a kind the contract does not know and a missing reason (400)
      - >-
        services-accounting:modules/transactions/tests/e2e/payments.e2e.spec.js#it
        is refused the allocate and reallocate routes without
        accounting.payments.update, and the void route without .void (403)
      - TST-ACC-TRX-011
      - TST-ACC-TRX-012
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/e2e/payment-reversals.e2e.spec.js#it
      is refused the reverse route without accounting.payments.reverse and the
      reversals read without .read (403)
    category: permission
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/e2e/payment-reversals.e2e.spec.js
        assertion: >-
          it is refused the reverse route without accounting.payments.reverse
          and the reversals read without .read (403)
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/e2e/payment-reversals.e2e.spec.js#it
          is refused the reverse route without accounting.payments.reverse and
          the reversals read without .read (403)
      - file: >-
          services-accounting:modules/transactions/tests/e2e/payment-reversals.e2e.spec.js
        assertion: >-
          it refuses a kind the contract does not know and a missing reason
          (400)
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/e2e/payment-reversals.e2e.spec.js#it
          refuses a kind the contract does not know and a missing reason (400)
      - file: >-
          services-accounting:modules/transactions/tests/e2e/payments.e2e.spec.js
        assertion: >-
          it is refused the allocate and reallocate routes without
          accounting.payments.update, and the void route without .void (403)
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/e2e/payments.e2e.spec.js#it
          is refused the allocate and reallocate routes without
          accounting.payments.update, and the void route without .void (403)
    binding_review: []
  - id: ATS-ACC-TRX-013-02
    title: Reversal type follows instrument behavior
    level: api
    proves:
      - BR-CAP-ACC-TRX-013-02
    preconditions: 'Paper check, card and cash receipts exist.'
    steps:
      - do: >-
          Submit bank return for check and bounced-check reversal for card and
          cash.
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
          refuses a kind the method does not allow (reversal_kind_mismatch): an
          ACH return of a check, a bounced check of a card
    expected: All incompatible kinds fail.
    negative: true
    data_needs: Configured methods with bounce behavior.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
        refuses a kind the method does not allow (reversal_kind_mismatch): an
        ACH return of a check, a bounced check of a card
      - >-
        services-accounting:modules/transactions/tests/integration/services/payments/payment-methods.integration.spec.js#it
        refuses a bounced check of cash, whose method may not bounce
        (reversal_kind_mismatch)
      - TST-ACC-TRX-080
      - TST-ACC-TRX-078
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      refuses a kind the method does not allow (reversal_kind_mismatch): an ACH
      return of a check, a bounced check of a card
    category: validation
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js
        assertion: >-
          it refuses a kind the method does not allow (reversal_kind_mismatch):
          an ACH return of a check, a bounced check of a card
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
          refuses a kind the method does not allow (reversal_kind_mismatch): an
          ACH return of a check, a bounced check of a card
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-methods.integration.spec.js
        assertion: >-
          it refuses a bounced check of cash, whose method may not bounce
          (reversal_kind_mismatch)
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-methods.integration.spec.js#it
          refuses a bounced check of cash, whose method may not bounce
          (reversal_kind_mismatch)
    binding_review: []
  - id: ATS-ACC-TRX-013-03
    title: Returned check restores debt exactly once
    level: api
    proves:
      - BR-CAP-ACC-TRX-013-03
      - BR-CAP-ACC-TRX-013-04
      - INV-DOM-ACC-TRX-003-11
    preconditions: A 50.00 check settled an invoice line.
    steps:
      - do: 'Record bounce, attempt another reversal and repeat the first request.'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
          reverses the live allocation so the line owes again, and the payment
          item’s facts sum to zero (FC-16)
    expected: >-
      Returned receipt has 50.00 reversed and zero net money facts; second
      reversal fails and replay retains the first.
    negative: false
    data_needs: An applied paper check.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
        completes the reversal at once for the whole 5000, numbered from
        1,000,000, and the payment is returned with 5000 reversed
      - >-
        services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
        reverses the live allocation so the line owes again, and the payment
        item’s facts sum to zero (FC-16)
      - >-
        services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
        refuses reversing it again (payment_not_live) and replays the same key
        as the same reversal
      - >-
        react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0306.spec.ts#ACT-ACC-0306
      - TST-ACC-TRX-080
      - TST-ACC-TRX-244
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      reverses the live allocation so the line owes again, and the payment
      item’s facts sum to zero (FC-16)
    category: transition
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js
        assertion: >-
          it completes the reversal at once for the whole 5000, numbered from
          1,000,000, and the payment is returned with 5000 reversed
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
          completes the reversal at once for the whole 5000, numbered from
          1,000,000, and the payment is returned with 5000 reversed
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js
        assertion: >-
          it reverses the live allocation so the line owes again, and the
          payment item’s facts sum to zero (FC-16)
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
          reverses the live allocation so the line owes again, and the payment
          item’s facts sum to zero (FC-16)
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js
        assertion: >-
          it refuses reversing it again (payment_not_live) and replays the same
          key as the same reversal
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
          refuses reversing it again (payment_not_live) and replays the same key
          as the same reversal
      - file: >-
          react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0306.spec.ts
        assertion: ACT-ACC-0306
        provenance: test
        source: >-
          react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0306.spec.ts#ACT-ACC-0306
    binding_review:
      - binding: >-
          react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0306.spec.ts#ACT-ACC-0306
        completeness: not-verified
        provenance: observed
        source: >-
          react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0306.spec.ts#ACT-ACC-0306
        note: >-
          This citation remains component evidence. A browser request driven
          through an API helper does not establish direct database checks or
          every branch of the combined scenario.
  - id: ATS-ACC-TRX-013-04
    title: Source credit blocks payment void
    level: api
    proves:
      - BR-CAP-ACC-TRX-013-03
      - BR-CAP-ACC-TRX-013-05
      - INV-DOM-ACC-TRX-003-12
    preconditions: A live credit derives from the receipt.
    steps:
      - do: 'Void the payment, void its credit, then retry payment void.'
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
          refuses a payment with a credit made from it that is not void
          (payment_has_credit)
    expected: >-
      Initial reversal fails and clearing the credit permits restoration of all
      applied debt.
    negative: false
    data_needs: A payment-backed credit.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/payments/allocate.integration.spec.js#it
        refused the void while a credit from the payment was open
        (payment_has_credit)
      - >-
        services-accounting:modules/transactions/tests/integration/services/payments/allocate.integration.spec.js#it
        marks the payment voided with the reason and takes every live allocation
        back
      - >-
        services-accounting:modules/transactions/tests/integration/services/payments/allocate.integration.spec.js#it
        reopens the lines it paid
      - >-
        services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
        refuses a payment with a credit made from it that is not void
        (payment_has_credit)
      - >-
        react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0305.spec.ts#ACT-ACC-0305
      - TST-ACC-TRX-070
      - TST-ACC-TRX-080
      - TST-ACC-TRX-243
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      refuses a payment with a credit made from it that is not void
      (payment_has_credit)
    category: interaction
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/payments/allocate.integration.spec.js
        assertion: >-
          it refused the void while a credit from the payment was open
          (payment_has_credit)
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/payments/allocate.integration.spec.js#it
          refused the void while a credit from the payment was open
          (payment_has_credit)
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/payments/allocate.integration.spec.js
        assertion: >-
          it marks the payment voided with the reason and takes every live
          allocation back
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/payments/allocate.integration.spec.js#it
          marks the payment voided with the reason and takes every live
          allocation back
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/payments/allocate.integration.spec.js
        assertion: it reopens the lines it paid
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/payments/allocate.integration.spec.js#it
          reopens the lines it paid
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js
        assertion: >-
          it refuses a payment with a credit made from it that is not void
          (payment_has_credit)
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
          refuses a payment with a credit made from it that is not void
          (payment_has_credit)
      - file: >-
          react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0305.spec.ts
        assertion: ACT-ACC-0305
        provenance: test
        source: >-
          react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0305.spec.ts#ACT-ACC-0305
    binding_review:
      - binding: >-
          react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0305.spec.ts#ACT-ACC-0305
        completeness: not-verified
        provenance: observed
        source: >-
          react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0305.spec.ts#ACT-ACC-0305
        note: >-
          Ordinary void and post-void refusals are asserted. The file does not
          create live receipt-derived credit and then cancel that grant before
          source void.
  - id: ATS-ACC-TRX-013-05
    title: Processor settlement determines void eligibility
    level: api
    proves:
      - BR-CAP-ACC-TRX-013-06
      - BR-CAP-ACC-TRX-013-07
    preconditions: One card capture is unsettled and another settled.
    steps:
      - do: Void each.
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
          fails a void the processor says is already settled (payment_settled):
          the reversal failed, the payment untouched
    expected: >-
      Unsettled capture reverses with reconciliation evidence and settled
      capture stays intact after refusal.
    negative: false
    data_needs: Processor void-state scripts.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
        completes with the dummy’s reference: the payment voided, 2000 reversed,
        its allocation reversed
      - >-
        services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
        records the void’s settlement item beside the capture: kind void, minus
        2000
      - >-
        services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
        fails a void the processor says is already settled (payment_settled):
        the reversal failed, the payment untouched
      - >-
        react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0307.spec.ts#ACT-ACC-0307
      - TST-ACC-TRX-080
      - TST-ACC-TRX-245
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      fails a void the processor says is already settled (payment_settled): the
      reversal failed, the payment untouched
    category: failure
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js
        assertion: >-
          it completes with the dummy’s reference: the payment voided, 2000
          reversed, its allocation reversed
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
          completes with the dummy’s reference: the payment voided, 2000
          reversed, its allocation reversed
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js
        assertion: >-
          it records the void’s settlement item beside the capture: kind void,
          minus 2000
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
          records the void’s settlement item beside the capture: kind void,
          minus 2000
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js
        assertion: >-
          it fails a void the processor says is already settled
          (payment_settled): the reversal failed, the payment untouched
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
          fails a void the processor says is already settled (payment_settled):
          the reversal failed, the payment untouched
      - file: >-
          react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0307.spec.ts
        assertion: ACT-ACC-0307
        provenance: test
        source: >-
          react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0307.spec.ts#ACT-ACC-0307
    binding_review:
      - binding: >-
          react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0307.spec.ts#ACT-ACC-0307
        completeness: not-verified
        provenance: observed
        source: >-
          react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0307.spec.ts#ACT-ACC-0307
        note: >-
          The deployed script does not provoke a settled-charge void refusal.
          That branch remains proved by the local service test rather than this
          browser file.
  - id: ATS-ACC-TRX-013-06
    title: Void eliminates the full associated fee
    level: api
    proves:
      - BR-CAP-ACC-TRX-013-08
    preconditions: A card settled required-fee billing.
    steps:
      - do: Void that receipt.
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/settlements/card-fees.integration.spec.js#it
          credits the fee invoice whole once the void reopens it: no money, no
          fee; the invoice owes again
    expected: The fee invoice is fully credited and billed debt reopens.
    negative: false
    data_needs: A fee-bearing card settlement.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/settlements/card-fees.integration.spec.js#it
        credits the fee invoice whole once the void reopens it: no money, no
        fee; the invoice owes again
      - TST-ACC-TRX-122
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/settlements/card-fees.integration.spec.js#it
      credits the fee invoice whole once the void reopens it: no money, no fee;
      the invoice owes again
    category: rule
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/settlements/card-fees.integration.spec.js
        assertion: >-
          it credits the fee invoice whole once the void reopens it: no money,
          no fee; the invoice owes again
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/settlements/card-fees.integration.spec.js#it
          credits the fee invoice whole once the void reopens it: no money, no
          fee; the invoice owes again
    binding_review: []
  - id: ATS-ACC-TRX-013-07
    title: Dispute lifecycle permits one conclusion
    level: api
    proves:
      - BR-CAP-ACC-TRX-013-09
      - INV-DOM-ACC-TRX-003-18
    preconditions: Card and check receipts are available.
    steps:
      - do: >-
          Win a card inquiry, target a check, exceed receipt value and reclose
          the inquiry.
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
          refuses closing a closed dispute (dispute_not_open), a dispute of a
          check (reversal_kind_mismatch) and an amount beyond the payment
    expected: Inquiry conclusion moves no money and invalid or repeated disputes fail.
    negative: false
    data_needs: Receipts of different behavior.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
        opens an inquiry for the payment’s whole amount, numbered from
        1,000,000, and closing it won leaves the payment as it was
      - >-
        services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
        refuses closing a closed dispute (dispute_not_open), a dispute of a
        check (reversal_kind_mismatch) and an amount beyond the payment
      - TST-ACC-TRX-080
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      refuses closing a closed dispute (dispute_not_open), a dispute of a check
      (reversal_kind_mismatch) and an amount beyond the payment
    category: validation
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js
        assertion: >-
          it opens an inquiry for the payment’s whole amount, numbered from
          1,000,000, and closing it won leaves the payment as it was
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
          opens an inquiry for the payment’s whole amount, numbered from
          1,000,000, and closing it won leaves the payment as it was
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js
        assertion: >-
          it refuses closing a closed dispute (dispute_not_open), a dispute of a
          check (reversal_kind_mismatch) and an amount beyond the payment
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
          refuses closing a closed dispute (dispute_not_open), a dispute of a
          check (reversal_kind_mismatch) and an amount beyond the payment
    binding_review: []
  - id: ATS-ACC-TRX-013-08
    title: Lost inquiry differs from lost chargeback
    level: api
    proves:
      - BR-CAP-ACC-TRX-013-10
    preconditions: Separate card disputes represent chargeback and inquiry.
    steps:
      - do: Close both as lost.
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/payments/dispute-inquiry-lost.integration.spec.js#it
          writes no payment reversal and leaves the payment succeeded, nothing
          reversed
    expected: >-
      Chargeback reverses with reconciliation evidence; inquiry preserves the
      receipt.
    negative: false
    data_needs: Two open processor disputes.
    bound_to:
      - >-
        services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
        closes a chargeback lost by reversing the payment as a chargeback:
        charged_back, the item keyed dispute:<id>:withdrawn
      - >-
        services-accounting:modules/transactions/tests/integration/services/payments/dispute-inquiry-lost.integration.spec.js#it
        writes no payment reversal and leaves the payment succeeded, nothing
        reversed
      - >-
        services-accounting:modules/transactions/tests/e2e/payment-reversals.e2e.spec.js#it
        opens a dispute on the card, reads it, lists it by payment and closes it
        lost, charging the payment back
      - TST-ACC-TRX-080
      - TST-ACC-TRX-073
      - TST-ACC-TRX-011
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/dispute-inquiry-lost.integration.spec.js#it
      writes no payment reversal and leaves the payment succeeded, nothing
      reversed
    category: transition
    test_bindings:
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js
        assertion: >-
          it closes a chargeback lost by reversing the payment as a chargeback:
          charged_back, the item keyed dispute:<id>:withdrawn
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
          closes a chargeback lost by reversing the payment as a chargeback:
          charged_back, the item keyed dispute:<id>:withdrawn
      - file: >-
          services-accounting:modules/transactions/tests/integration/services/payments/dispute-inquiry-lost.integration.spec.js
        assertion: >-
          it writes no payment reversal and leaves the payment succeeded,
          nothing reversed
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/integration/services/payments/dispute-inquiry-lost.integration.spec.js#it
          writes no payment reversal and leaves the payment succeeded, nothing
          reversed
      - file: >-
          services-accounting:modules/transactions/tests/e2e/payment-reversals.e2e.spec.js
        assertion: >-
          it opens a dispute on the card, reads it, lists it by payment and
          closes it lost, charging the payment back
        provenance: test
        source: >-
          services-accounting:modules/transactions/tests/e2e/payment-reversals.e2e.spec.js#it
          opens a dispute on the card, reads it, lists it by payment and closes
          it lost, charging the payment back
    binding_review: []
  - id: ATS-ACC-TRX-013-09
    title: Partial chargeback should preserve undisputed value
    level: api
    proves:
      - BR-CAP-ACC-TRX-013-11
    preconditions: An 80.00 applied card receipt has a 30.00 chargeback.
    steps:
      - do: Close it lost.
        provenance: proposed
        source: 'services-accounting:docs/milestones/plans/ACCT-M2-plan.md#D7'
    expected: The proposed outcome reverses 30.00 while retaining 50.00 applied.
    negative: false
    data_needs: A partially disputed card receipt.
    bound_to: []
    provenance: proposed
    source: 'services-accounting:docs/milestones/plans/ACCT-M2-plan.md#D7'
    category: edge
    test_bindings: []
    binding_review: []
  - id: ATS-ACC-TRX-013-10
    title: Returned receipts respect credit and processor outcomes
    category: interaction
    level: api
    proves:
      - BR-CAP-ACC-TRX-013-03
      - BR-CAP-ACC-TRX-013-04
      - BR-CAP-ACC-TRX-013-05
      - BR-CAP-ACC-TRX-013-06
      - BR-CAP-ACC-TRX-007-10
      - BR-CAP-ACC-TRX-011-02
      - BR-CAP-ACC-TRX-011-09
      - BR-CAP-ACC-TRX-012-03
      - BR-CAP-ACC-TRX-012-09
      - BR-CAP-ACC-TRX-020-08
      - BR-CAP-ACC-TRX-009-10
    exercises:
      - CAP-ACC-TRX-013
      - CAP-ACC-TRX-007
      - CAP-ACC-TRX-011
      - CAP-ACC-TRX-012
      - CAP-ACC-TRX-020
      - CAP-ACC-TRX-009
    preconditions: >-
      An isolated workspace has eligible customers, products, matching accounts,
      an open period and two open batches. Each branch owns separate financial
      records.
    steps:
      - do: >-
          Create receipt-derived credit and attempt source void, cancel an
          unused grant and retry an eligible void. Compare a settled card’s
          refused void with a refund request, then redeliver a bank-return event
          after recovery. In another branch, recover an uncertain
          credit-and-card settlement before evaluating reversal eligibility.
        provenance: proposed
        source: >-
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
          reverses the live allocation so the line owes again, and the payment
          item’s facts sum to zero (FC-16);
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
          refuses reversing it again (payment_not_live) and replays the same key
          as the same reversal;
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
          refuses a payment with a credit made from it that is not void
          (payment_has_credit);
          services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
          fails a void the processor says is already settled (payment_settled):
          the reversal failed, the payment untouched;
          rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-007-resolve-lost-processor-answers-and-clear-bank-debits.md#WF-ACC-TRX-007;
          rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-011-void-or-reverse-a-payment-and-follow-its-disputes.md#WF-ACC-TRX-011;
          rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-013-apply-payment-events-from-the-integration-platform.md#WF-ACC-TRX-013;
          rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-03;
          rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-04;
          rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-05;
          rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-06;
          rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-007-take-card-and-bank-payments-through-the-processor.md#BR-CAP-ACC-TRX-007-10;
          rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-011-give-a-customer-credit-and-apply-it.md#BR-CAP-ACC-TRX-011-02;
          rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-011-give-a-customer-credit-and-apply-it.md#BR-CAP-ACC-TRX-011-09;
          rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-03;
          rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-09;
          rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-020-let-commerce-and-the-processor-work-with-accounting-safely.md#BR-CAP-ACC-TRX-020-08;
          rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-009-settle-a-customer-s-invoices-in-one-step.md#BR-CAP-ACC-TRX-009-10
    expected: >-
      Credit protects its source until cancellation; a settled capture uses
      refund treatment; replayed return confirmation restores debt once and
      leaves no available receipt money.
    negative: false
    data_needs: >-
      Separate command keys, two customers, invoice lines, receipts and credit;
      controlled processor outcomes and a fixed calendar where the branch
      requires them.
    bound_to: []
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      reverses the live allocation so the line owes again, and the payment
      item’s facts sum to zero (FC-16);
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      refuses reversing it again (payment_not_live) and replays the same key as
      the same reversal;
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      refuses a payment with a credit made from it that is not void
      (payment_has_credit);
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      fails a void the processor says is already settled (payment_settled): the
      reversal failed, the payment untouched;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-007-resolve-lost-processor-answers-and-clear-bank-debits.md#WF-ACC-TRX-007;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-011-void-or-reverse-a-payment-and-follow-its-disputes.md#WF-ACC-TRX-011;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-013-apply-payment-events-from-the-integration-platform.md#WF-ACC-TRX-013;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-03;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-04;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-05;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-06;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-007-take-card-and-bank-payments-through-the-processor.md#BR-CAP-ACC-TRX-007-10;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-011-give-a-customer-credit-and-apply-it.md#BR-CAP-ACC-TRX-011-02;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-011-give-a-customer-credit-and-apply-it.md#BR-CAP-ACC-TRX-011-09;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-03;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-09;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-020-let-commerce-and-the-processor-work-with-accounting-safely.md#BR-CAP-ACC-TRX-020-08;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-009-settle-a-customer-s-invoices-in-one-step.md#BR-CAP-ACC-TRX-009-10
    test_bindings: []
    binding_review: []
evidence:
  - >-
    services-accounting at f47cb263875bbc0c5640fba7dae6785ec32695f8: the test
    files named in bound_to.
  - >-
    react-console at baf6dae382d6f41dce976c7f848667ccc37e076f: the Playwright
    journeys ACT-ACC-0305, 0306, 0307.
  - >-
    rhythm-v2-docs:specs/accounting/transactions/design: related workflows,
    domain invariants and state transitions examined for the back-fill.
coverage:
  rule: covered
  transition: 'gap: FND-ACC-TRX-078'
  validation: covered
  permission: covered
  edge: covered
  failure: covered
  boundary: 'gap: FND-ACC-TRX-078'
  concurrency: 'gap: FND-ACC-TRX-078'
  invariant: 'gap: FND-ACC-TRX-078'
  interaction: covered
coverage_notes:
  boundary: >-
    No dedicated boundary scenario covers the applicable conditions; the finding
    identifies the remaining specification work.
  concurrency: >-
    No dedicated concurrency scenario covers the applicable conditions; the
    finding identifies the remaining specification work.
  invariant: >-
    No dedicated invariant scenario covers the applicable conditions; the
    finding identifies the remaining specification work.
  transition: >-
    Selected transition scenarios exist, but the listed state paths still need
    explicit guard, effect and actor mappings.
interaction_coverage:
  - to: CAP-ACC-TRX-007
    scenarios:
      - ATS-ACC-TRX-013-10
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      reverses the live allocation so the line owes again, and the payment
      item’s facts sum to zero (FC-16);
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      refuses reversing it again (payment_not_live) and replays the same key as
      the same reversal;
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      refuses a payment with a credit made from it that is not void
      (payment_has_credit);
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      fails a void the processor says is already settled (payment_settled): the
      reversal failed, the payment untouched;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-007-resolve-lost-processor-answers-and-clear-bank-debits.md#WF-ACC-TRX-007;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-011-void-or-reverse-a-payment-and-follow-its-disputes.md#WF-ACC-TRX-011;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-013-apply-payment-events-from-the-integration-platform.md#WF-ACC-TRX-013;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-03;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-04;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-05;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-06;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-007-take-card-and-bank-payments-through-the-processor.md#BR-CAP-ACC-TRX-007-10;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-011-give-a-customer-credit-and-apply-it.md#BR-CAP-ACC-TRX-011-02;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-011-give-a-customer-credit-and-apply-it.md#BR-CAP-ACC-TRX-011-09;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-03;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-09;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-020-let-commerce-and-the-processor-work-with-accounting-safely.md#BR-CAP-ACC-TRX-020-08;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-009-settle-a-customer-s-invoices-in-one-step.md#BR-CAP-ACC-TRX-009-10
  - to: CAP-ACC-TRX-009
    scenarios:
      - ATS-ACC-TRX-013-10
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      reverses the live allocation so the line owes again, and the payment
      item’s facts sum to zero (FC-16);
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      refuses reversing it again (payment_not_live) and replays the same key as
      the same reversal;
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      refuses a payment with a credit made from it that is not void
      (payment_has_credit);
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      fails a void the processor says is already settled (payment_settled): the
      reversal failed, the payment untouched;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-007-resolve-lost-processor-answers-and-clear-bank-debits.md#WF-ACC-TRX-007;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-011-void-or-reverse-a-payment-and-follow-its-disputes.md#WF-ACC-TRX-011;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-013-apply-payment-events-from-the-integration-platform.md#WF-ACC-TRX-013;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-03;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-04;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-05;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-06;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-007-take-card-and-bank-payments-through-the-processor.md#BR-CAP-ACC-TRX-007-10;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-011-give-a-customer-credit-and-apply-it.md#BR-CAP-ACC-TRX-011-02;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-011-give-a-customer-credit-and-apply-it.md#BR-CAP-ACC-TRX-011-09;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-03;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-09;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-020-let-commerce-and-the-processor-work-with-accounting-safely.md#BR-CAP-ACC-TRX-020-08;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-009-settle-a-customer-s-invoices-in-one-step.md#BR-CAP-ACC-TRX-009-10
  - to: CAP-ACC-TRX-011
    scenarios:
      - ATS-ACC-TRX-013-10
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      reverses the live allocation so the line owes again, and the payment
      item’s facts sum to zero (FC-16);
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      refuses reversing it again (payment_not_live) and replays the same key as
      the same reversal;
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      refuses a payment with a credit made from it that is not void
      (payment_has_credit);
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      fails a void the processor says is already settled (payment_settled): the
      reversal failed, the payment untouched;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-007-resolve-lost-processor-answers-and-clear-bank-debits.md#WF-ACC-TRX-007;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-011-void-or-reverse-a-payment-and-follow-its-disputes.md#WF-ACC-TRX-011;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-013-apply-payment-events-from-the-integration-platform.md#WF-ACC-TRX-013;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-03;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-04;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-05;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-06;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-007-take-card-and-bank-payments-through-the-processor.md#BR-CAP-ACC-TRX-007-10;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-011-give-a-customer-credit-and-apply-it.md#BR-CAP-ACC-TRX-011-02;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-011-give-a-customer-credit-and-apply-it.md#BR-CAP-ACC-TRX-011-09;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-03;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-09;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-020-let-commerce-and-the-processor-work-with-accounting-safely.md#BR-CAP-ACC-TRX-020-08;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-009-settle-a-customer-s-invoices-in-one-step.md#BR-CAP-ACC-TRX-009-10
  - to: CAP-ACC-TRX-012
    scenarios:
      - ATS-ACC-TRX-013-10
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      reverses the live allocation so the line owes again, and the payment
      item’s facts sum to zero (FC-16);
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      refuses reversing it again (payment_not_live) and replays the same key as
      the same reversal;
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      refuses a payment with a credit made from it that is not void
      (payment_has_credit);
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      fails a void the processor says is already settled (payment_settled): the
      reversal failed, the payment untouched;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-007-resolve-lost-processor-answers-and-clear-bank-debits.md#WF-ACC-TRX-007;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-011-void-or-reverse-a-payment-and-follow-its-disputes.md#WF-ACC-TRX-011;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-013-apply-payment-events-from-the-integration-platform.md#WF-ACC-TRX-013;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-03;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-04;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-05;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-06;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-007-take-card-and-bank-payments-through-the-processor.md#BR-CAP-ACC-TRX-007-10;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-011-give-a-customer-credit-and-apply-it.md#BR-CAP-ACC-TRX-011-02;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-011-give-a-customer-credit-and-apply-it.md#BR-CAP-ACC-TRX-011-09;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-03;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-09;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-020-let-commerce-and-the-processor-work-with-accounting-safely.md#BR-CAP-ACC-TRX-020-08;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-009-settle-a-customer-s-invoices-in-one-step.md#BR-CAP-ACC-TRX-009-10
  - to: CAP-ACC-TRX-020
    scenarios:
      - ATS-ACC-TRX-013-10
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      reverses the live allocation so the line owes again, and the payment
      item’s facts sum to zero (FC-16);
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      refuses reversing it again (payment_not_live) and replays the same key as
      the same reversal;
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      refuses a payment with a credit made from it that is not void
      (payment_has_credit);
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      fails a void the processor says is already settled (payment_settled): the
      reversal failed, the payment untouched;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-007-resolve-lost-processor-answers-and-clear-bank-debits.md#WF-ACC-TRX-007;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-011-void-or-reverse-a-payment-and-follow-its-disputes.md#WF-ACC-TRX-011;
      rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-013-apply-payment-events-from-the-integration-platform.md#WF-ACC-TRX-013;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-03;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-04;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-05;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#BR-CAP-ACC-TRX-013-06;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-007-take-card-and-bank-payments-through-the-processor.md#BR-CAP-ACC-TRX-007-10;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-011-give-a-customer-credit-and-apply-it.md#BR-CAP-ACC-TRX-011-02;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-011-give-a-customer-credit-and-apply-it.md#BR-CAP-ACC-TRX-011-09;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-03;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-012-pay-money-back-with-refunds.md#BR-CAP-ACC-TRX-012-09;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-020-let-commerce-and-the-processor-work-with-accounting-safely.md#BR-CAP-ACC-TRX-020-08;
      rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-009-settle-a-customer-s-invoices-in-one-step.md#BR-CAP-ACC-TRX-009-10
transition_coverage:
  - state_model: STATE-ACC-TRX-007
    transition: 1
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/payments/payment-reverse.ts;
        services-accounting:modules/transactions/services/integrations/integration-events.ts;
        services-accounting:modules/transactions/db/payment-reversals.table.ts;
        services-accounting:modules/transactions/db/disputes.table.ts;
        services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
        reverses the live allocation so the line owes again, and the payment
        item’s facts sum to zero (FC-16)
  - state_model: STATE-ACC-TRX-007
    transition: 2
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/payments/payment-reverse.ts;
        services-accounting:modules/transactions/services/integrations/integration-events.ts;
        services-accounting:modules/transactions/db/payment-reversals.table.ts;
        services-accounting:modules/transactions/db/disputes.table.ts;
        services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
        fails a void the processor says is already settled (payment_settled):
        the reversal failed, the payment untouched
  - state_model: STATE-ACC-TRX-007
    transition: 3
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/payments/payment-reverse.ts;
        services-accounting:modules/transactions/services/integrations/integration-events.ts;
        services-accounting:modules/transactions/db/payment-reversals.table.ts;
        services-accounting:modules/transactions/db/disputes.table.ts;
        services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
        records the void’s settlement item beside the capture: kind void, minus
        2000
  - state_model: STATE-ACC-TRX-007
    transition: 4
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/payments/payment-reverse.ts;
        services-accounting:modules/transactions/services/integrations/integration-events.ts;
        services-accounting:modules/transactions/db/payment-reversals.table.ts;
        services-accounting:modules/transactions/db/disputes.table.ts;
        services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
        fails a void the processor says is already settled (payment_settled):
        the reversal failed, the payment untouched
  - state_model: STATE-ACC-TRX-007
    transition: 5
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/payments/payment-reverse.ts;
        services-accounting:modules/transactions/services/integrations/integration-events.ts;
        services-accounting:modules/transactions/db/payment-reversals.table.ts;
        services-accounting:modules/transactions/db/disputes.table.ts;
        services-accounting:modules/transactions/tests/integration/services/stripe/stripe-webhooks.integration.spec.js#it
        opens a chargeback from charge.dispute.created, reading the tenant
        through the PaymentIntent, once
  - state_model: STATE-ACC-TRX-007
    transition: 6
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/payments/payment-reverse.ts;
        services-accounting:modules/transactions/services/integrations/integration-events.ts;
        services-accounting:modules/transactions/db/payment-reversals.table.ts;
        services-accounting:modules/transactions/db/disputes.table.ts;
        services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
        refuses closing a closed dispute (dispute_not_open), a dispute of a
        check (reversal_kind_mismatch) and an amount beyond the payment
  - state_model: STATE-ACC-TRX-007
    transition: 7
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/payments/payment-reverse.ts;
        services-accounting:modules/transactions/services/integrations/integration-events.ts;
        services-accounting:modules/transactions/db/payment-reversals.table.ts;
        services-accounting:modules/transactions/db/disputes.table.ts;
        services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
        refuses closing a closed dispute (dispute_not_open), a dispute of a
        check (reversal_kind_mismatch) and an amount beyond the payment
  - state_model: STATE-ACC-TRX-007
    transition: 8
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/payments/payment-reverse.ts;
        services-accounting:modules/transactions/services/integrations/integration-events.ts;
        services-accounting:modules/transactions/db/payment-reversals.table.ts;
        services-accounting:modules/transactions/db/disputes.table.ts;
        services-accounting:modules/transactions/tests/integration/services/payments/dispute-inquiry-lost.integration.spec.js#it
        writes no payment reversal and leaves the payment succeeded, nothing
        reversed
  - state_model: STATE-ACC-TRX-006
    transition: 1
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/payments/payment-receive.ts;
        services-accounting:modules/transactions/services/payments/payment-reverse.ts;
        services-accounting:modules/transactions/services/refunds/refund-commands.ts;
        services-accounting:modules/transactions/db/payments.table.ts;
        services-accounting:modules/transactions/tests/integration/services/payments/receive-offline.integration.spec.js#it
        refuses a date in no open period (period_not_open)
  - state_model: STATE-ACC-TRX-006
    transition: 2
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/payments/payment-receive.ts;
        services-accounting:modules/transactions/services/payments/payment-reverse.ts;
        services-accounting:modules/transactions/services/refunds/refund-commands.ts;
        services-accounting:modules/transactions/db/payments.table.ts;
        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
  - state_model: STATE-ACC-TRX-006
    transition: 3
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/payments/payment-receive.ts;
        services-accounting:modules/transactions/services/payments/payment-reverse.ts;
        services-accounting:modules/transactions/services/refunds/refund-commands.ts;
        services-accounting:modules/transactions/db/payments.table.ts;
        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
  - state_model: STATE-ACC-TRX-006
    transition: 4
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/payments/payment-receive.ts;
        services-accounting:modules/transactions/services/payments/payment-reverse.ts;
        services-accounting:modules/transactions/services/refunds/refund-commands.ts;
        services-accounting:modules/transactions/db/payments.table.ts;
        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
  - state_model: STATE-ACC-TRX-006
    transition: 5
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/payments/payment-receive.ts;
        services-accounting:modules/transactions/services/payments/payment-reverse.ts;
        services-accounting:modules/transactions/services/refunds/refund-commands.ts;
        services-accounting:modules/transactions/db/payments.table.ts;
        services-accounting:modules/transactions/tests/integration/services/refunds/refunds.integration.spec.js#it
        records it offline: executed, the payment partially_refunded with 1000
        refunded (FC-11, FC-14)
  - state_model: STATE-ACC-TRX-006
    transition: 6
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/payments/payment-receive.ts;
        services-accounting:modules/transactions/services/payments/payment-reverse.ts;
        services-accounting:modules/transactions/services/refunds/refund-commands.ts;
        services-accounting:modules/transactions/db/payments.table.ts;
        services-accounting:modules/transactions/tests/integration/services/refunds/refunds.integration.spec.js#it
        records it offline: executed, the payment partially_refunded with 1000
        refunded (FC-11, FC-14)
  - state_model: STATE-ACC-TRX-006
    transition: 7
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/payments/payment-receive.ts;
        services-accounting:modules/transactions/services/payments/payment-reverse.ts;
        services-accounting:modules/transactions/services/refunds/refund-commands.ts;
        services-accounting:modules/transactions/db/payments.table.ts;
        services-accounting:modules/transactions/tests/integration/services/refunds/refunds.integration.spec.js#it
        records it offline: executed, the payment partially_refunded with 1000
        refunded (FC-11, FC-14)
  - state_model: STATE-ACC-TRX-006
    transition: 8
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/payments/payment-receive.ts;
        services-accounting:modules/transactions/services/payments/payment-reverse.ts;
        services-accounting:modules/transactions/services/refunds/refund-commands.ts;
        services-accounting:modules/transactions/db/payments.table.ts;
        services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
        reverses the live allocation so the line owes again, and the payment
        item’s facts sum to zero (FC-16)
  - state_model: STATE-ACC-TRX-006
    transition: 9
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/payments/payment-receive.ts;
        services-accounting:modules/transactions/services/payments/payment-reverse.ts;
        services-accounting:modules/transactions/services/refunds/refund-commands.ts;
        services-accounting:modules/transactions/db/payments.table.ts;
        services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
        refuses a kind the method does not allow (reversal_kind_mismatch): an
        ACH return of a check, a bounced check of a card
  - state_model: STATE-ACC-TRX-006
    transition: 10
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    note: >-
      Existing scenarios establish selected paths; this exact guard, side-effect
      and actor combination still needs an explicit scenario mapping.
    evidence:
      - >-
        services-accounting:modules/transactions/services/payments/payment-receive.ts;
        services-accounting:modules/transactions/services/payments/payment-reverse.ts;
        services-accounting:modules/transactions/services/refunds/refund-commands.ts;
        services-accounting:modules/transactions/db/payments.table.ts;
        services-accounting:modules/transactions/tests/integration/services/payments/dispute-inquiry-lost.integration.spec.js#it
        writes no payment reversal and leaves the payment succeeded, nothing
        reversed
permission_coverage:
  - key: accounting.payments.void
    where_checked: api
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    note: >-
      Existing permission scenarios are retained; assertion-level coverage of
      this grant at every declared surface remains unverified.
    evidence:
      - >-
        rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#CAP-ACC-TRX-013
  - key: accounting.payments.reverse
    where_checked: api
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    note: >-
      Existing permission scenarios are retained; assertion-level coverage of
      this grant at every declared surface remains unverified.
    evidence:
      - >-
        rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#CAP-ACC-TRX-013
  - key: accounting.payments.read
    where_checked: api
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    note: >-
      Existing permission scenarios are retained; assertion-level coverage of
      this grant at every declared surface remains unverified.
    evidence:
      - >-
        rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#CAP-ACC-TRX-013
  - key: accounting.disputes.create
    where_checked: api
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    note: >-
      Existing permission scenarios are retained; assertion-level coverage of
      this grant at every declared surface remains unverified.
    evidence:
      - >-
        rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#CAP-ACC-TRX-013
  - key: accounting.disputes.read
    where_checked: api
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    note: >-
      Existing permission scenarios are retained; assertion-level coverage of
      this grant at every declared surface remains unverified.
    evidence:
      - >-
        rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#CAP-ACC-TRX-013
  - key: accounting.disputes.update
    where_checked: api
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    note: >-
      Existing permission scenarios are retained; assertion-level coverage of
      this grant at every declared surface remains unverified.
    evidence:
      - >-
        rhythm-v2-docs:specs/accounting/transactions/planning/capabilities/CAP-ACC-TRX-013-undo-a-payment-whose-money-did-not-stay.md#CAP-ACC-TRX-013
rule_coverage:
  - rule: BR-CAP-ACC-TRX-013-01
    scenarios:
      - ATS-ACC-TRX-013-01
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/e2e/payment-reversals.e2e.spec.js#it
      is refused the reverse route without accounting.payments.reverse and the
      reversals read without .read (403)
  - rule: BR-CAP-ACC-TRX-013-02
    scenarios:
      - ATS-ACC-TRX-013-02
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      refuses a kind the method does not allow (reversal_kind_mismatch): an ACH
      return of a check, a bounced check of a card
  - rule: BR-CAP-ACC-TRX-013-03
    scenarios:
      - ATS-ACC-TRX-013-03
      - ATS-ACC-TRX-013-04
      - ATS-ACC-TRX-013-10
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      reverses the live allocation so the line owes again, and the payment
      item’s facts sum to zero (FC-16)
  - rule: BR-CAP-ACC-TRX-013-04
    scenarios:
      - ATS-ACC-TRX-013-03
      - ATS-ACC-TRX-013-10
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      refuses reversing it again (payment_not_live) and replays the same key as
      the same reversal
  - rule: BR-CAP-ACC-TRX-013-05
    scenarios:
      - ATS-ACC-TRX-013-04
      - ATS-ACC-TRX-013-10
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      refuses a payment with a credit made from it that is not void
      (payment_has_credit)
  - rule: BR-CAP-ACC-TRX-013-06
    scenarios:
      - ATS-ACC-TRX-013-05
      - ATS-ACC-TRX-013-10
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      fails a void the processor says is already settled (payment_settled): the
      reversal failed, the payment untouched
  - rule: BR-CAP-ACC-TRX-013-07
    scenarios:
      - ATS-ACC-TRX-013-05
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      records the void’s settlement item beside the capture: kind void, minus
      2000
  - rule: BR-CAP-ACC-TRX-013-08
    scenarios:
      - ATS-ACC-TRX-013-06
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/settlements/card-fees.integration.spec.js#it
      credits the fee invoice whole once the void reopens it: no money, no fee;
      the invoice owes again
  - rule: BR-CAP-ACC-TRX-013-09
    scenarios:
      - ATS-ACC-TRX-013-07
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      refuses closing a closed dispute (dispute_not_open), a dispute of a check
      (reversal_kind_mismatch) and an amount beyond the payment
  - rule: BR-CAP-ACC-TRX-013-10
    scenarios:
      - ATS-ACC-TRX-013-08
    provenance: proposed
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/dispute-inquiry-lost.integration.spec.js#it
      writes no payment reversal and leaves the payment succeeded, nothing
      reversed
  - rule: BR-CAP-ACC-TRX-013-11
    scenarios:
      - ATS-ACC-TRX-013-09
    provenance: proposed
    source: OQ-ACC-TRX-003
executable_gaps:
  - scenario: ATS-ACC-TRX-013-09
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    evidence:
      - 'services-accounting:docs/milestones/plans/ACCT-M2-plan.md#D7'
  - scenario: ATS-ACC-TRX-013-10
    gap: FND-ACC-TRX-078
    provenance: unknown
    source: FND-ACC-TRX-078
    evidence:
      - >-
        services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
        reverses the live allocation so the line owes again, and the payment
        item’s facts sum to zero (FC-16);
        services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
        refuses reversing it again (payment_not_live) and replays the same key
        as the same reversal;
        services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
        refuses a payment with a credit made from it that is not void
        (payment_has_credit);
        services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
        fails a void the processor says is already settled (payment_settled):
        the reversal failed, the payment untouched;
        rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-007-resolve-lost-processor-answers-and-clear-bank-debits.md#WF-ACC-TRX-007;
        rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-011-void-or-reverse-a-payment-and-follow-its-disputes.md#WF-ACC-TRX-011;
        rhythm-v2-docs:specs/accounting/transactions/design/workflows/WF-ACC-TRX-013-apply-payment-events-from-the-integration-platform.md#WF-ACC-TRX-013
invariant_coverage:
  - invariant: INV-DOM-ACC-TRX-003-11
    scenarios:
      - ATS-ACC-TRX-013-03
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      refuses reversing it again (payment_not_live) and replays the same key as
      the same reversal
    note: >-
      The cited scenario and its constituent test assertions are the proof
      boundary.
  - invariant: INV-DOM-ACC-TRX-003-12
    scenarios:
      - ATS-ACC-TRX-013-04
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      refuses a payment with a credit made from it that is not void
      (payment_has_credit)
    note: >-
      The cited scenario and its constituent test assertions are the proof
      boundary.
  - invariant: INV-DOM-ACC-TRX-003-18
    scenarios:
      - ATS-ACC-TRX-013-07
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/payments/payment-reversals.integration.spec.js#it
      refuses closing a closed dispute (dispute_not_open), a dispute of a check
      (reversal_kind_mismatch) and an amount beyond the payment
    note: >-
      The cited scenario and its constituent test assertions are the proof
      boundary.
---

# Record receipts that were voided or returned: Capability Test Specification

## Coverage

The category map separates specified examples from recorded gaps. The table lists a scenario or finding for each rule requiring proof; a listed scenario may still be proposed. Executable bindings cover their cited assertions, while the transition, permission and invariant registers identify combinations that need further proof.

| Required rule | Scenario or finding |
|---|---|
| `BR-CAP-ACC-TRX-013-01` | `ATS-ACC-TRX-013-01` |
| `BR-CAP-ACC-TRX-013-02` | `ATS-ACC-TRX-013-02` |
| `BR-CAP-ACC-TRX-013-03` | `ATS-ACC-TRX-013-03`, `ATS-ACC-TRX-013-04`, `ATS-ACC-TRX-013-10` |
| `BR-CAP-ACC-TRX-013-04` | `ATS-ACC-TRX-013-03`, `ATS-ACC-TRX-013-10` |
| `BR-CAP-ACC-TRX-013-05` | `ATS-ACC-TRX-013-04`, `ATS-ACC-TRX-013-10` |
| `BR-CAP-ACC-TRX-013-06` | `ATS-ACC-TRX-013-05`, `ATS-ACC-TRX-013-10` |
| `BR-CAP-ACC-TRX-013-07` | `ATS-ACC-TRX-013-05` |
| `BR-CAP-ACC-TRX-013-08` | `ATS-ACC-TRX-013-06` |
| `BR-CAP-ACC-TRX-013-09` | `ATS-ACC-TRX-013-07` |
| `BR-CAP-ACC-TRX-013-10` | `ATS-ACC-TRX-013-08` |
| `BR-CAP-ACC-TRX-013-11` | `ATS-ACC-TRX-013-09` |

## Interactions With Related Capabilities

Create receipt-derived credit and attempt source void, cancel an unused grant and retry an eligible void. Compare a settled card’s refused void with a refund request, then redeliver a bank-return event after recovery. In another branch, recover an uncertain credit-and-card settlement before evaluating reversal eligibility.

Credit protects its source until cancellation; a settled capture uses refund treatment; replayed return confirmation restores debt once and leaves no available receipt money. The complete chain remains proposed until one executable run proves its combined outcomes.
