MOD FIN 006 CSH
Domain specifications / D05-FIN / 5. Detailed Functional Requirements / 5.6 Module Specification: Cashiering, Receipts, Refunds and Payment Allocation
5.6 Module Specification: Cashiering, Receipts, Refunds and Payment Allocation¶
5.6.1 Module Overview¶
Module ID: MOD-FIN-006 (code CSH)
Purpose:
Take deposits and payments, issue receipts, allocate payments to invoices, process refunds and control cashier sessions so that cash and ledger reconcile.
Business Capabilities: - CAP-FIN-006 Cashiering and payment management
Primary Actors: - Cashier (ACT-FIN-002), finance supervisor (ACT-FIN-005), patient / representative (ACT-FIN-014)
Dependencies: - MOD-FIN-003 (account and invoices), MOD-FIN-007 (posting) - Domain 10 authorization and audit; Domain 2 for any payment-channel integration
5.6.2 Functional Areas¶
Functional Area ID: FA-FIN-012 Cashiering and payment allocation
Description:
Point-of-service payment taking, receipting and allocation.
Scope: - Included: deposits, payments by configured payment methods, receipts, allocation, unallocated credit; online payment orders started from the portal and reconciliation of provider settlements. - Excluded: operation of external payment processors; integration with them, where used, is an adapter through Domain 2.
Functional Area ID: FA-FIN-013 Refunds and cashier session control
Description:
Refund processing and the opening, closing and reconciliation of cashier sessions.
Scope: - Included: refund request, approval, pay-out; session open, close, count, variance. - Excluded: bank reconciliation in the finance system.
5.6.3 Detailed Requirements¶
Requirement FR-FIN-CSH-001: Cashiering, deposits, receipts and payment allocation¶
| Attribute | Description |
|---|---|
| Requirement ID | FR-FIN-CSH-001 |
| Requirement Name | Cashiering, deposits, receipts and payment allocation |
| Requirement Type | Functional |
| Module | Cashiering, Receipts, Refunds and Payment Allocation |
| Functional Area | FA-FIN-012 Cashiering and payment allocation |
| Priority | Must |
| Criticality | High |
| Requirement Status | Draft |
| Source | FIN-003, RCM-011; contributes to SAFE-004 |
| Related Business Rule | BR-FIN-007, BR-FIN-012 |
| Related Workflow | WF-FIN-003 |
1. Requirement Statement
The system shall support cashiering of deposits, co-payments and payments with issue of a uniquely numbered receipt and allocation of each payment to invoices or to account credit, and shall prevent a repeated submission from creating a duplicate payment.
2. Business Rationale
FIN-003 requires cashiering, deposits and payment reconciliation; RCM-011 requires deposits and co-payments on the receivable ledger; SAFE-004 names duplicate payment as a case that must behave safely.
3. Actors and Permissions
| Actor | Permission | Conditions |
|---|---|---|
| Cashier | Create payment and deposit; issue receipt; allocate | Open cashier session at an assigned cash point |
| Finance supervisor | Reallocate posted payments (by reversal and new allocation); reprint authorization where required | Reason mandatory |
| Billing officer | Read payments | — |
| Patient portal service identity (Domain 7) | Start an online payment of an issued statement balance; read its status | For the verified patient or authorized representative; online payment enabled |
| Payment provider adapter service identity | Report the result of an online payment order; deliver settlement reports | Scoped to the contracted provider (EXT-FIN-010) |
4. Preconditions - The cashier has an open session (FR-FIN-CSH-003); online payments are attributed to the system session of the online payment cash point (part 6.12). - An account exists for the patient or encounter.
5. Trigger - A patient or representative presents to pay; a payment notification arrives from an integrated payment channel; the portal requests the start of an online payment (FR-PEX-BIL-002); a provider settlement report arrives.
6. Functional Behaviour
- The system displays the account, open invoices and amount due, with patient identity shown consistently.
- The system records a payment or deposit with amount, currency, payment method and method reference, and posts it to the account ledger.
- The system requires explicit confirmation before posting and attaches an idempotency key to each submission so that a retry or double submission posts once. For a card payment the amount is pushed to the bank terminal and the approval reference returned; for QRIS a dynamic code is shown for the lifetime set in CFG-FIN-021. The attempt is shown as "Waiting for terminal", "Approved · [reference]", "Declined by terminal" or "QR code expired". When no answer arrives in time, the system shows "Checking whether this was paid" and queries the terminal or the provider for the result before any retry is offered, so that the patient is never charged twice (CUX-36).
- The system issues a receipt with a unique, never-reused number and records each reprint as a copy.
- The system allocates a payment to selected invoices or by the configured default rule; unallocated amounts remain as account credit.
- The system supports split payment across payment methods in one transaction.
- The system publishes PaymentPosted.
- The "guarantee letter" method does not take or post money. It shows the payer share covered by the guarantee letter recorded on the coverage workspace (UI-FIN-007; FR-FIN-PAY-003 part 6.8), with a link to it, so that the cashier collects only the patient share. The payer share is recovered through the claim.
- Online payment start. On a payment-start request from the portal (IF-FIN-012) carrying the statement, amount, method (QRIS, virtual account or card) and an idempotency key, the system checks that the statement is issued, that the amount equals its current outstanding balance (partial online payment is not offered) and that no other order for the statement is open. It creates an online payment order (Created), registers it with the payment provider through the Domain 2 adapter and returns the link to the provider's hosted payment page; the order is then Awaiting payment. The link carries only the provider's order reference. Card numbers, bank credentials and one-time codes are entered only on the provider's page and never enter the HIS.
- Result. The system accepts the provider's result only through the adapter, verifies the notification (signature, order reference and amount) and confirms it by a status query to the provider before acting. A verified success posts the payment (type payment, method and the provider's transaction reference), allocates it to the statement's invoices, issues the electronic receipt and publishes PaymentPosted; the order is Paid. A verified failure makes the order Failed; an order with no result by its expiry time (CFG-FIN-027) is queried once more and then Expired. The patient's return from the provider's page is never treated as proof of payment.
- Late or unexpected results. A success reported for an order that is already Expired or Failed, or a second success for a statement already paid, is posted to the account as unallocated credit and raised as an exception item for review and refund where due (FR-FIN-CSH-002); money received is never discarded. A notification that fails verification is quarantined and changes nothing.
- Settlement reconciliation. Online payments are attributed to the system session of an online payment cash point, one per facility and settlement day, closed at the provider's settlement cut-off. The system matches the provider's settlement report line by line (order reference, amount, fee) to the posted online payments, records the provider fee as a configured posting type, and lists unmatched lines, missing settlements and amount differences as exception items for the finance accountant. The session is accepted when the settlement reconciles (REP-FIN-022).
7. Input Requirements
| Input Field | Data Type | Mandatory | Validation | Description |
|---|---|---|---|---|
| Account / invoice | Identifier | Yes | Active account | Target |
| Amount and currency | Decimal, code | Yes | Greater than zero; configured currency | Value |
| Payment method and reference | Code, text | Yes / per method | Method enabled at cash point | Tender |
| Payment type | Code | Yes | Payment, deposit, co-payment | Classification |
| Idempotency key | Identifier | Yes (system-generated) | Unique per intended payment | Duplicate prevention |
| Online payment start: statement, amount, method, idempotency key | Identifier, decimal, code, identifier | Yes for an online payment | Statement issued; amount equals the outstanding balance; method enabled for the facility | From the portal |
| Provider result: order reference, status, amount, provider transaction reference, signature | Structured | From the provider | Signature valid; order and amount match | Confirmed by status query |
| Settlement report lines: order reference, amount, fee, settlement date | Structured / file | From the provider | Order exists; amounts non-negative | Settlement reconciliation |
8. Processing Rules
| Rule ID | Processing Rule | Expected Result |
|---|---|---|
| PR-CSH-001-01 | Same idempotency key returns the original result | Single posting |
| PR-CSH-001-02 | Allocation total cannot exceed the payment amount; allocation to an invoice cannot exceed its outstanding amount | No over-allocation |
| PR-CSH-001-03 | Payment, receipt and session total are committed together | Cash and ledger agree |
| PR-CSH-001-04 | At most one online payment order per statement is Created or Awaiting payment; a repeated start with the same idempotency key returns the same order | No double payment from repeated taps |
| PR-CSH-001-05 | An online payment is posted only on a provider result verified by signature and confirmed by status query, and once per provider transaction reference | No false or duplicate "Paid" |
| PR-CSH-001-06 | No card data or bank credential is received, logged or stored; only the provider's order and transaction references are kept | HIS outside card-data scope (ASM-FIN-005) |
9. Output Requirements
| Output | Format | Recipient | Description |
|---|---|---|---|
| Receipt | Printed and electronic document | Patient | Proof of payment |
| Payment and allocation entries | Ledger records | Account | Posted payment |
| PaymentPosted event | Domain event | MOD-FIN-007, Domains 7 and 8 | Payment posted |
10. Validation and Error Handling
| Scenario | Validation | System Response | User Message / Action |
|---|---|---|---|
| No open session | Session check | Reject | "Open a cashier session first" |
| Duplicate submission | Idempotency key | Return original receipt | "Payment already recorded: receipt N" |
| Payment channel result unknown | Channel status | Mark pending; do not issue receipt until confirmed | "Payment confirmation pending" |
| Receipt printer failure | Device status | Payment remains posted; reprint available | "Receipt not printed; reprint" |
| Online start for an amount other than the outstanding balance | Balance check | Refuse; return the current balance | "The amount has been updated" (shown by the portal) |
| Online order already open for the statement | PR-CSH-001-04 | Refuse a second order | "A payment for this statement is already in progress" (shown by the portal) |
| Provider or adapter unavailable at start | Call failure | No order registered; Created order closed as Failed | Portal offers the other payment routes |
| Provider notification fails verification | Signature or amount check | Quarantine; no state change | Integration exception for the finance accountant |
| Success reported after expiry or failure | State check | Post as unallocated credit; exception item | "Online payment received after order closed" |
| Settlement line with no posted payment, or posted payment missing from settlement | Settlement match | Exception item | "Settlement not matched" |
11. State and Lifecycle Behaviour
Payment: Posted, Allocated, Reversed. A payment is corrected only by reversal (FR-FIN-BIL-003). Online payment order: Created, Awaiting payment, Paid, Failed, Expired (section 4.3); the portal shows Created and Awaiting payment as "Payment being confirmed" once the patient returns, Paid as "Paid", and Failed and Expired as "Payment not completed".
12. Audit Requirements
The system shall audit payment posting, allocation, reallocation, receipt issue and every reprint, with cashier, cash point, session and time; and, for online payments, the start request (requester and patient acted for), every provider notification and status query with its verification outcome, each order state change, and settlement reconciliation runs.
13. Security and Privacy Requirements
Cashier actions require an individual identity and an open session. The system does not store payment card data beyond a method reference; any card-processing scope is confined to the external payment channel (proposed position, ASM-FIN-005).
14. Acceptance Criteria
- AC-01: Given an issued patient invoice, when the cashier takes full payment, then a payment and allocation are posted, a uniquely numbered receipt is issued and the invoice is Settled.
- AC-02: Given a payment submission repeated with the same idempotency key, when processed, then one payment exists and the original receipt is returned.
- AC-03: Given a deposit taken at admission, when the final invoice is issued, then the deposit is allocated under the configured rule and any remainder is account credit.
- AC-04: Given a partial payment, when posted, then the invoice is Partially paid and the outstanding amount is correct.
- AC-05: Given an issued statement with a balance, when the portal starts an online payment twice with the same idempotency key, then one order exists, Awaiting payment, with one hosted-page link that carries no patient data.
- AC-06: Given an order Awaiting payment, when the provider's verified success arrives and the status query confirms it, then one payment is posted and allocated, an electronic receipt is issued, PaymentPosted is published and the order is Paid; when the patient only returns from the provider's page without a result, nothing is posted.
- AC-07: Given an order with no result by its expiry time, when the expiry runs, then the order is Expired; and if a success then arrives, the money is posted as unallocated credit with an exception item.
- AC-08: Given a provider settlement report for a day, when it is reconciled, then each line matches one posted online payment, the fee is posted, and any unmatched line or missing payment is an exception item.
15. Dependencies and Integration
- Upstream dependencies: MOD-FIN-003.
- Downstream dependencies: MOD-FIN-007, Domain 7, Domain 8.
- Required events or APIs: EVT-FIN-005 PaymentPosted; IF-FIN-006; IF-FIN-012 online payment start and result; EXT-FIN-010 payment provider.
16. Open Questions / Assumptions
- Payment methods in the first release (DEC-FIN-008, resolved 2026-11-17): cash; debit and credit card through the bank terminal, with the amount pushed and the approval reference returned; QRIS with a dynamic code; bank transfer and virtual account for deposits and corporate payers; guarantee letters (shown as the payer share, part 6.8; no money is posted). Online payment through the portal comes with the portal: the patient is handed to the provider's hosted page and Domain 5 creates the order, verifies the result and posts the payment (parts 6.9 to 6.12; FR-PEX-BIL-002). Card data is never stored in the HIS. The acquiring bank and payment provider are selected by the CFO.
Requirement FR-FIN-CSH-002: Refunds¶
| Attribute | Description |
|---|---|
| Requirement ID | FR-FIN-CSH-002 |
| Requirement Name | Refunds |
| Requirement Type | Functional |
| Module | Cashiering, Receipts, Refunds and Payment Allocation |
| Functional Area | FA-FIN-013 Refunds and cashier session control |
| Priority | Must |
| Criticality | High |
| Requirement Status | Draft |
| Source | FIN-003, RCM-011, RCM-005; contributes to SAFE-004 |
| Related Business Rule | BR-FIN-006, BR-FIN-012, BR-FIN-013 |
| Related Workflow | WF-FIN-005 |
1. Requirement Statement
The system shall support refunds of deposits and payments as distinct, approved transactions linked to the original payment, limited to the refundable amount, and posted as new ledger entries without altering the original payment.
2. Business Rationale
FIN-003 and RCM-011 require refunds; RCM-005 requires payment corrections to use reversal or adjustment entries.
3. Actors and Permissions
| Actor | Permission | Conditions |
|---|---|---|
| Cashier / billing officer | Request refund | Reason mandatory |
| Finance supervisor | Approve or reject refund | Different user from requester |
| Cashier | Pay out approved refund | Open session |
4. Preconditions - The account holds refundable credit (unallocated payment, unused deposit, or overpayment after credit note).
5. Trigger - Patient request; credit arising from a credit note or adjudication; account closure with credit balance.
6. Functional Behaviour
- The system calculates the refundable amount for the account and the original payment.
- The system records a refund request with amount, reason, payee and refund method.
- The system requires approval under the configured rule before pay-out.
- On pay-out, the system posts a refund entry linked to the original payment, issues a refund voucher and updates the cashier session total.
- The system prevents the same refund from being paid twice through explicit state transitions and an idempotency key.
7. Input Requirements
| Input Field | Data Type | Mandatory | Validation | Description |
|---|---|---|---|---|
| Original payment / account | Identifier | Yes | Has refundable amount | Source |
| Amount | Decimal | Yes | Greater than zero; not above refundable amount | Value |
| Reason | Code, text | Yes | Configured list | Accountability |
| Payee and refund method | Text, code | Yes | Method permitted for original tender | Pay-out |
8. Processing Rules
| Rule ID | Processing Rule | Expected Result |
|---|---|---|
| PR-CSH-002-01 | Cumulative refunds against a payment cannot exceed the payment less amounts allocated and not credited | No over-refund |
| PR-CSH-002-02 | A refund can be paid only from state Approved, once | No duplicate pay-out |
9. Output Requirements
| Output | Format | Recipient | Description |
|---|---|---|---|
| Refund voucher | Document | Patient / payee | Proof of refund |
| Refund ledger entry | Ledger record | Account, finance posting | Posted refund |
10. Validation and Error Handling
| Scenario | Validation | System Response | User Message / Action |
|---|---|---|---|
| Amount exceeds refundable | Amount check | Reject | "Maximum refundable amount is X" |
| Self-approval | Segregation check | Reject | "Approval requires a different user" |
| Pay-out repeated | State / idempotency | Return original result | "Refund already paid" |
11. State and Lifecycle Behaviour
Refund: Requested, Approved or Rejected, Paid (section 4.3).
12. Audit Requirements
The system shall audit request, approval or rejection, and pay-out with users, times, reason and linked payment.
13. Security and Privacy Requirements
Refund request, approval and pay-out permissions are separate; approval cannot be performed by the requester. Payee details are Confidential.
14. Acceptance Criteria
- AC-01: Given an unused deposit, when a refund is requested, approved by a different user and paid, then a refund entry linked to the deposit exists, the original deposit entry is unchanged and the account balance is correct.
- AC-02: Given a refund request above the refundable amount, when submitted, then it is rejected.
- AC-03: Given an approved refund, when pay-out is submitted twice, then one refund entry exists.
15. Dependencies and Integration
- Upstream dependencies: MOD-FIN-003, FR-FIN-BIL-003.
- Downstream dependencies: MOD-FIN-007, Domain 8.
- Required events or APIs: RefundPaid event (EVT-FIN-012, proposed).
16. Open Questions / Assumptions
- Whether every refund requires approval or only refunds above a threshold is proposed configuration (CFG-FIN-006).
Requirement FR-FIN-CSH-003: Cashier session control and payment reconciliation¶
| Attribute | Description |
|---|---|
| Requirement ID | FR-FIN-CSH-003 |
| Requirement Name | Cashier session control and payment reconciliation |
| Requirement Type | Functional |
| Module | Cashiering, Receipts, Refunds and Payment Allocation |
| Functional Area | FA-FIN-013 Refunds and cashier session control |
| Priority | Must |
| Criticality | High |
| Requirement Status | Draft |
| Source | FIN-003 (payment reconciliation; "financial postings balance and are auditable"); contributes to SEC-001 |
| Related Business Rule | BR-FIN-007, BR-FIN-024 |
| Related Workflow | WF-FIN-003 |
1. Requirement Statement
The system shall record all cashier transactions within a cashier session owned by one identified user at one cash point, and shall reconcile, at session close, the declared amounts by payment method to the payments, deposits and refunds posted in the session, recording any variance.
2. Business Rationale
FIN-003 requires payment reconciliation and balanced, auditable postings. Session control is the proposed mechanism for reconciling cash to ledger at the point of collection (ASM-FIN-004).
3. Actors and Permissions
| Actor | Permission | Conditions |
|---|---|---|
| Cashier | Open and close own session; declare amounts | One open session per cashier |
| Finance supervisor | Review and accept session close, as a "Cashier session close" item on UI-FIN-006; approve variance | Different user from cashier |
4. Preconditions - The cashier is assigned to the cash point.
5. Trigger - Start and end of a cashier's shift; supervisor request to close.
6. Functional Behaviour
- The system opens a session with cashier, cash point, opening float and time.
- The system attributes every payment, deposit, refund and receipt to exactly one session.
- At close, the cashier declares counted amounts by payment method; the system compares them with posted totals and calculates variance.
- The system requires supervisor acceptance of the close and a reason for any variance. Every close goes to the approval queue as a "Cashier session close" item: a close with zero variance is accepted in one step. A non-zero variance is an approval request ("Cashier session variance") decided on UI-FIN-006: Awaiting approval, then Approved, when the variance is posted and the session Accepted, or Rejected, when the cashier recounts and declares the amounts again; no transaction is added to the closed session.
- The system produces a session report listing transactions, totals by method, refunds and variance.
- The system reports sessions left open beyond a configured duration.
7. Input Requirements
| Input Field | Data Type | Mandatory | Validation | Description |
|---|---|---|---|---|
| Cash point | Reference | Yes | Active; cashier assigned | Location |
| Opening float | Decimal | Yes | Non-negative | Starting cash |
| Declared amounts by method | Decimal list | Yes at close | Non-negative | Count |
| Variance reason | Text | When variance is non-zero | Not empty | Accountability |
8. Processing Rules
| Rule ID | Processing Rule | Expected Result |
|---|---|---|
| PR-CSH-003-01 | Expected amount per method equals float plus payments and deposits less refunds for that method | Correct comparison |
| PR-CSH-003-02 | A closed session accepts no further transactions | Stable totals |
9. Output Requirements
| Output | Format | Recipient | Description |
|---|---|---|---|
| Session close report | Report | Cashier, supervisor, finance | Totals and variance |
| Session totals | Data | MOD-FIN-007 | Basis for cash posting |
10. Validation and Error Handling
| Scenario | Validation | System Response | User Message / Action |
|---|---|---|---|
| Second session opened by same cashier | Uniqueness check | Reject | "You already have an open session" |
| Close with unconfirmed pending payments | Pending check | Warn and list | "Pending payments must be resolved or carried to exception" |
11. State and Lifecycle Behaviour
Session: Open, Closed pending acceptance, Accepted, shown as "Open", "Closed · awaiting acceptance" and "Accepted" (glossary 10). A session with a variance stays Closed pending acceptance while its variance approval request is Awaiting approval (section 4.3).
12. Audit Requirements
The system shall audit session open, close, declaration, variance and acceptance with users and times.
13. Security and Privacy Requirements
Shared cashier logins are not permitted (SEC-001 applied to financial access). Session acceptance is segregated from the cashier.
14. Acceptance Criteria
- AC-01: Given a session with payments in two methods and one refund, when closed with correct declarations, then variance is zero and the session report totals equal the ledger postings for the session.
- AC-02: Given a declared amount below the expected amount, when closed, then the variance is recorded and acceptance requires a reason and a supervisor.
- AC-03: Given a closed session, when a payment is attempted in it, then it is rejected.
15. Dependencies and Integration
- Upstream dependencies: FR-FIN-CSH-001, FR-FIN-CSH-002.
- Downstream dependencies: MOD-FIN-007.
- Required events or APIs: none external.
16. Open Questions / Assumptions
- The session model is a proposed control; local cash-handling policy may require adjustments (ASM-FIN-004).
← 5.5 Module Specification: Payer, Coverage and Authorization Coordination | Contents | Identifier index | 5.7 Module Specification: Finance Posting and Reconciliation Interfaces →