Reject ambiguous settlement amounts before import
Finance received a row containing 12,34 EUR beside rows using 12.34. The importer currently guesses the separator and silently books the wrong amount.
- Focused work estimate
- 1h 30m + prerequisites
- Priority in the scenario
- High
- Engineering practice
- Input validation · Money arithmetic · Error contracts
Estimated field mix
- Backend80%
- API design20%
Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.
Review it, then add it to your workspace.
The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.
Project context
A fictional subscription service invoices in USD and EUR. Finance currently compares a payment-provider CSV with database exports; late refunds and retried imports make the monthly close unreliable. Work on synthetic ledger entries only.
Setup prerequisites
- REST APIs
- SQL transactions
- Integer money representation
Preceding work
No earlier ticket is required. Complete the project setup above.
Acceptance criteria
- Accept documented decimal-dot amounts and convert them to integer minor units.
- Reject mixed separators, excess precision, and unsupported currency codes with row numbers.
- A rejected file creates no settlement rows.
Implementation constraints
- The exercise supports USD and EUR, both with two minor digits; do not use floating-point arithmetic.
Verification to include
- Import 0.01, 12.34, and a negative refund amount exactly.
- Reject 12,34 and 1.005 without partial writes.
Deliverables
- Settlement input contract and parser regression fixtures
Rollout and recovery
Run validation against saved synthetic files before enabling persistence; revert the parser behind the importer flag.
Value of the work
For the engineer: Practice monetary invariants, concurrent writes, reconciliation, and operational recovery across one service boundary.
For the team: Review how an engineer makes discrepancies explainable and recoverable before a financial workflow is trusted.
Evidence boundaries
Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.
Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.