---
id: CAP-ACC-TRX-014
title: Unwind billed purchases and their collected value
feature: FEAT-ACC-TRX-02
product_area: accounting
module: transactions
revision: 1
status: draft
product_intent: proposed
implementation_evidence: observed
supersedes:
  - CAP-ACC-INV-025
  - CAP-ACC-PAY-030
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
intent_sources:
  - 'services-accounting:docs/architecture/accounting-2.0/02-decisions.md#D-06'
  - 'services-accounting:docs/architecture/accounting-2.0/02-decisions.md#D-01'
  - 'services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-5'
  - 'services-accounting:docs/milestones/plans/ACCT-M2-plan.md#D7'
  - 'services-accounting:docs/milestones/plans/ACCT-M2-plan.md#D3'
purpose: Staff and Commerce cancel billed value with coordinated adjustments and return treatment.
outcomes:
  - Staff and Commerce cancel billed value with coordinated adjustments and return treatment.
  - >-
    Processor refunds can remain unresolved after the financial preparation commits. Offline refunds remain
    work for staff, so completion can include an exception.
concepts:
  - CON-ACC-TRX-001
  - CON-ACC-TRX-003
  - CON-ACC-TRX-004
actors:
  - ACT-ACC-021
  - ACT-ACC-012
surfaces:
  - console
  - api
permissions:
  - key: accounting.reversals.create
    where_checked: api
    scope: tenant
  - key: accounting.reversals.preview
    where_checked: api
    scope: tenant
  - key: accounting.reversals.read
    where_checked: api
    scope: tenant
rules:
  - id: BR-CAP-ACC-TRX-014-01
    proved_by: [ATS-ACC-TRX-014-01, TST-ACC-TRX-117]
    statement: >-
      Billing reversal requires an issued real invoice and its own eligible line quantities or values; invalid
      lifecycle, unrelated lines and excessive reversal are refused.
    kind: validation
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it
      refuses a draft invoice (invoice_not_draft), a line of another invoice (invoice_mismatch) and more than
      a line has left (over_application)
    origin: 'services-accounting:docs/architecture/accounting-2.0/02-decisions.md#D-06'
  - id: BR-CAP-ACC-TRX-014-02
    proved_by: [ATS-ACC-TRX-003-12, ATS-ACC-TRX-014-02, ATS-ACC-TRX-014-09, TST-ACC-TRX-117]
    statement: >-
      The operation first credits unused line value and releases no-longer-needed paid value back to the
      contributing payments.
    kind: calculation
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it
      wrote the credit memo of 4000 on the line, which freed the line’s 4000 back onto the check (W-05)
    origin: 'services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-5'
  - id: BR-CAP-ACC-TRX-014-03
    proved_by: [ATS-ACC-TRX-011-10, ATS-ACC-TRX-014-02, ATS-ACC-TRX-014-09, TST-ACC-TRX-117]
    statement: >-
      A cancellation fee creates a separate invoice paid using credit derived from one contributing payment’s
      released money.
    kind: calculation
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it
      issued the fee invoice of 500 and settled it with a credit of 500 made from the check’s freed money
    origin: 'services-accounting:docs/architecture/accounting-2.0/02-decisions.md#D-06'
  - id: BR-CAP-ACC-TRX-014-04
    proved_by: [ATS-ACC-TRX-003-12, ATS-ACC-TRX-011-10, ATS-ACC-TRX-014-03, ATS-ACC-TRX-014-09, TST-ACC-TRX-116, TST-ACC-TRX-117, TST-ACC-TRX-261]
    statement: >-
      The selected remainder treatment issues credit or requests a refund per contributing payment; processor
      refunds execute immediately and offline refunds await staff.
    kind: calculation
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/reversals/reversal-two-payments.integration.spec.js#it
      requests one refund per payment, 7000 and 3000, each from its own payment
    origin: none
    note: >-
      The cited build recommendation does not establish Product approval; the authority gap remains open in
      FND-ACC-TRX-035.
  - id: BR-CAP-ACC-TRX-014-05
    proved_by: [ATS-ACC-TRX-012-12, ATS-ACC-TRX-014-04, ATS-ACC-TRX-014-09, ATS-ACC-TRX-020-09, TST-ACC-TRX-117]
    statement: >-
      Financial preparation commits atomically and an invalid step leaves nothing; external refund execution
      afterward can remain unresolved.
    kind: invariant
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it
      refuses a reversal dated in no open period (period_not_open), writing nothing
    origin: 'services-accounting:docs/architecture/accounting-2.0/02-decisions.md#D-01'
  - id: BR-CAP-ACC-TRX-014-06
    proved_by: [ATS-ACC-TRX-014-05, TST-ACC-TRX-113, TST-ACC-TRX-117, TST-ACC-TRX-260]
    statement: >-
      Preview calculates the same per-payment and refund-payer results and retains no records, but
      document-number allocations still advance.
    kind: policy
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/reversals/reversals.integration.spec.js#it
      answers the figures of reversing 2000 more of the dues line with a fee of 300 and writes nothing
    origin: 'services-accounting:docs/architecture/accounting-2.0/02-decisions.md#D-06'
  - id: BR-CAP-ACC-TRX-014-07
    proved_by: [ATS-ACC-TRX-012-12, ATS-ACC-TRX-014-06, ATS-ACC-TRX-020-09, TST-ACC-TRX-114, TST-ACC-TRX-115]
    statement: >-
      Billing adjustments book immediately; unresolved processor refunds keep reversal pending, successful
      refunds complete it, and failed or staff-payable refunds produce completion with an exception.
    kind: lifecycle
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/reversals/reversal-refund-status.integration.spec.js#it
      turns succeeded and completed when the signed event settles the refund
    origin: none
    note: >-
      The cited build recommendation does not establish Product approval; the authority gap remains open in
      FND-ACC-TRX-035.
  - id: BR-CAP-ACC-TRX-014-08
    proved_by: [ATS-ACC-TRX-014-07, TST-ACC-TRX-122]
    statement: Reversed card-paid value also releases and credits its share of the processing-fee invoice.
    kind: calculation
    enforced_at:
      - service
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/settlements/card-fees.integration.spec.js#it
      credits the fee’s share of the reversed money off the fee invoice and frees it with the rest: 4000 of
      10000 reversed frees 4112
    origin: 'services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-17'
  - id: BR-CAP-ACC-TRX-014-09
    proved_by: [ATS-ACC-TRX-014-08, TST-ACC-TRX-017]
    statement: 'Creation, preview and reading require reversal create, preview and read authorities respectively.'
    kind: permission
    enforced_at:
      - api
    must_prove: true
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/e2e/settlements.e2e.spec.js#it is refused the reversal
      routes without accounting.reversals.create, .preview and .read (403)
    origin: 'services-accounting:docs/architecture/accounting-2.0/02-decisions.md#D-06'
scenarios:
  - id: SC-CAP-ACC-TRX-014-01
    given: A member cancels two of four card-paid gala tickets.
    when: Preview Reverse Invoice Lines and then confirm.
    then: Preview retains no financial records; confirmation credits the two tickets and refunds their card value.
    provenance: test
    source: 'react-console:acceptance/accounting/playwright/journeys/payments/ACT-ACC-0327.spec.ts#ACT-ACC-0327'
  - id: SC-CAP-ACC-TRX-014-02
    given: A single invoice was paid by a 60.00 check and a 40.00 card tender.
    when: Reverse all billed value with refund treatment.
    then: The processor returns 40.00 and an offline request leaves staff responsible for the 60.00 check refund.
    provenance: test
    source: >-
      services-accounting:modules/transactions/tests/integration/services/reversals/reversal-check-and-card.integration.spec.js#it
      previews the refund by who pays it: 4000 through the processor and 6000 for staff
edge_cases: []
depends_on:
  - CAP-ACC-TRX-003
  - CAP-ACC-TRX-011
  - CAP-ACC-TRX-012
related:
  - CAP-ACC-TRX-020
journeys:
  - JNY-ACC-TRX-005
  - JNY-ACC-TRX-006
evidence:
  - >-
    services-accounting at f47cb263875bbc0c5640fba7dae6785ec32695f8:
    modules/transactions/aws/api/reversals.routes.ts (reverseBilling, previewReversal, getReversal);
    services/reversals/reversal-commands.ts, reversal-answers.ts; db/reversals.table.ts;
    docs/accounting/reversals.md; tests integration/services/reversals/*,
    integration/services/settlements/card-fees, e2e/settlements.e2e.spec.js,
    e2e/service-functions.e2e.spec.js.
  - >-
    react-console at baf6dae382d6f41dce976c7f848667ccc37e076f:
    app/(console)/console/[tenantId]/accounting/invoices/[invoiceId]/reverse, reversals/[reversalId];
    components/accounting/invoices/reverse-invoice-screen.tsx, components/accounting/reversals/*; journeys
    ACT-ACC-0327, 0328, 0802.
controls: [TC-IAM-001, TC-IAM-002, TC-IAM-004, TC-IAM-005, TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-AZ-006, TC-TEN-001, TC-TEN-002, TC-TEN-003, TC-CRY-001, TC-DAT-001, TC-DAT-002, TC-DAT-003, TC-LOG-004, TC-LOG-005, TC-PI-001, TC-PI-003, TC-PI-005, TC-VEN-001, TC-VEN-002, TC-VEN-003, TC-PRV-001, TC-PRV-002]
exercised_by: [FAS-ACC-TRX-02-01, FAS-ACC-TRX-02-02, FAS-ACC-TRX-02-04, FAS-ACC-TRX-02-05]
suites: [TST-ACC-TRX-017, TST-ACC-TRX-113, TST-ACC-TRX-114, TST-ACC-TRX-115, TST-ACC-TRX-116, TST-ACC-TRX-117, TST-ACC-TRX-122, TST-ACC-TRX-260, TST-ACC-TRX-261]
---

# Unwind billed purchases and their collected value

## Purpose

Staff and Commerce cancel billed value with coordinated adjustments and return treatment.

## How It Works

Staff select the invoice lines or quantities to reverse. Preview calculates the proposed money movement before records are retained. Confirmation creates the credit memo and releases paid value. A selected cancellation fee becomes a separate settled invoice. Remaining value becomes credit or refunds against the contributing payments. Processor refunds can remain unresolved after the financial preparation commits. Offline refunds remain work for staff, so completion can include an exception.

## Relationships

- Adjust billed value with memos supplies or continues the related financial work.
- Provide and spend customer credit supplies or continues the related financial work.
- Return customer money with accountable refunds supplies or continues the related financial work.
- Coordinate financial commands across applications supplies or continues the related financial work.
