Skip to content

CAP-ACC-TRX-013Record receipts that were voided or returned

Markdown

CAP-ACC-TRX-013

Record receipts that were voided or returned

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationInconsistent

KindCapabilityProduct areaAccountingModuleTransactionsRevision1

Read atservices-accounting f47cb263react-console baf6dae3

The Formal Contract

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

Outcomes
Staff explain money that did not remain collected and restore the affected debt.Disputes track inquiry or chargeback outcomes and can trigger reversal when a chargeback is lost. The product should settle the amount policy for partial chargebacks before design approval.
Surfaces
consoleapijob
Intent sources
services-accounting:docs/milestones/plans/ACCT-M2-plan.md#D4services-accounting:docs/milestones/plans/ACCT-M2-plan.md#D5services-accounting:docs/milestones/plans/ACCT-M2-plan.md#D6services-accounting:docs/milestones/plans/ACCT-M2-plan.md#D7services-accounting:docs/architecture/accounting-2.0/02-decisions.md#M2-4services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-8services-accounting:docs/architecture/accounting-2.0/02-decisions.md#A-13

Controls

29 controls apply, from the corpus control catalogue.

TC-IAM-001 TC-IAM-002 TC-IAM-004 TC-IAM-005 TC-IAM-006 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-002 TC-LOG-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

Permissions

KeyChecked atScope
accounting.payments.voidapitenant
accounting.payments.reverseapitenant
accounting.payments.readapitenant
accounting.disputes.createapitenant
accounting.disputes.readapitenant
accounting.disputes.updateapitenant

Business Rules

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

IdRuleKindEnforced atProvenance
01must prove
Proposed
Payment void and reversal use separate sensitive authorities and both require an explanation.
permissionapitest
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)
02must prove
Proposed
Reversal type follows the payment behavior: offline receipts allow void and, if bounce-enabled, bounced check; processor receipts allow void, bank return and chargeback.
validationservicetest
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
03must prove
Proposed
A successful reversal negates live allocations, restores invoice debt and leaves the payment voided, returned or charged back with no available value.
lifecycleservice, databasetest
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)
04must prove
Proposed
A payment permits at most one nonfailed reversal, and voiding preserves the payment record.
invariantservice, databasetest
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
05must prove
Proposed
Any nonvoid credit derived from a payment blocks its reversal, including a fully used credit.
validationservicetest
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)
06must prove
Proposed
Processor void precedes local reversal, and a settled charge rejects voiding in favor of refunding.
lifecycleservicetest
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
07must prove
Proposed
A completed processor reversal adds its negative reconciliation item.
invariantservicetest
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
08must prove
Proposed
Reversing payment of a processing-fee invoice credits that fee invoice in full.
calculationservicetest
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
09must prove
Proposed
A dispute requires a live card or bank payment and an amount no greater than its total, and can close once with a won, lost or closed outcome.
validationservice, databasetest
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
10must prove
Proposed
Losing a chargeback closes the dispute and reverses the payment together; losing an inquiry alone leaves the payment untouched.
lifecycleservicetest
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
11must prove
Proposed
The product should restrict lost-chargeback reversal to the disputed amount; the current implementation reverses the whole payment.
calculationserviceunknown
12
Proposed
Processor events can create and close disputes, with repeat delivery prevented from applying the outcome twice.
policyservicetest
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

Scenarios

IdGivenWhenThenProvenance
01The bank returns a member’s paper check.Record a bounced-check reversal.Returned payment standing accompanies reopened debt and the retained reversal record.test
02A check receipt was assigned to the wrong member.Void it from the receipt page.The receipt remains visible as voided and its paid invoices become outstanding again.test
03A dispute claims one cent from an 80.00 card receipt.Close the chargeback dispute as lost.Current behavior reverses the full 80.00, preserving the discrepancy for Product review.test

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