Reverse Transaction
Overview
Reverse a SETTLED transaction, restoring all balances and creating offsetting journal entries. Works for any completed transaction type (deposits, loans, teller operations, etc.).
Note: Full API implementation pending. Use the existing universal-transaction-management.md documentation for reversal workflows.
Endpoint
POST /api/bpm/cmd/ReverseTransactionCommand
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
transactionKey | string | Yes | Transaction reference |
reversalReason | string | Yes | Detailed reversal reason |
reversalCategory | string | No | Category: ERROR_CORRECTION, FRAUD, CUSTOMER_REQUEST, SYSTEM_ERROR, DUPLICATE, OTHER |
Reversal Categories
| Category | Description | Use Case |
|---|---|---|
ERROR_CORRECTION | Operational error fix | Wrong amount, wrong account |
FRAUD | Fraudulent transaction | Detected after settlement |
CUSTOMER_REQUEST | Customer dispute/request | Customer claims unauthorized |
SYSTEM_ERROR | System/technical error | Duplicate processing |
DUPLICATE | Duplicate transaction | Same payment twice |
OTHER | Other reasons | Miscellaneous |
What Gets Reversed
1. Balance Changes
BEFORE REVERSAL: Balance = 60,000 (after +10,000 deposit)
AFTER REVERSAL: Balance = 50,000 (restored to original)
2. Accounting Entries
Creates offsetting journal entries:
- DR Customer Account 10,000
- CR Teller Cash 10,000
3. Transaction State
SETTLED → REVERSED (terminal state)
State Transition
Related Commands
- Cancel Transaction - For PENDING transactions
- Get All Transactions - Find transactions to reverse
- Get Transaction Details - Review before reversing
For complete documentation, see Universal Transaction Management.