Original practice scenario: A hypothetical payment network receives an authorization, retries, a partial capture and a reversal in different orders. Design a record model for the remaining hold.
Read model answer +
Model authorizations, captures and reversals as identified events with stated relationships. Compute remaining exposure from valid state transitions rather than overwriting one mutable status field.
Work through it
Assign stable message identities and retain the original authorization reference, amount and currency; deduplicate equivalent retransmissions without merging different adjustments.
Define which captures and reversals are permitted against the authorization and how partial amounts, expiration and unmatched messages are represented.
Apply updates consistently within the relevant account or authorization boundary, retaining a reconciliation queue for late or missing references and auditable correction events.
Tradeoffs to discuss
Immediate provisional handling improves responsiveness, but final reconciliation needs clear authority when counterparties disagree or messages are missing.
Common pitfalls
A reversal of an already captured amount is not automatically the same operation as releasing an unused hold.
Reject cross-currency arithmetic unless an explicit conversion contract applies.
Original practice scenario: A hypothetical merchant dashboard divides disputes filed this month by transactions processed this month. Explain why the ratio can mislead and propose a cohort-based query.
Read model answer +
Match dispute outcomes to the transaction population that could generate them. Filing-month counts can refer to old purchases while the denominator contains unrelated new activity.
Work through it
Link each dispute to its original transaction identity and merchant, deduplicating repeated case updates and distinguishing multiple valid dispute categories if the metric requires them.
Create transaction-date cohorts, define an observation maturity window, and count eligible transactions with at least one qualifying dispute under that rule.
Report cohort size, matured coverage and uncertainty alongside the rate, separating unresolved linkage and merchants with insufficient history.
Tradeoffs to discuss
Mature cohorts are comparable but lag current operations; a separate filing-volume measure can support staffing without pretending to be a transaction risk rate.
Common pitfalls
Joining every case update to transactions can multiply both amounts and counts.
Changing dispute eligibility or observation windows requires a metric version, not a silent dashboard edit.