The balance shown in a player account is a convenient summary of a much more demanding record-keeping problem. Deposits, reservations, wagers, settlements, reversals and withdrawals may originate in different systems and arrive at different times. An attractive account interface cannot compensate for a ledger that cannot explain how its numbers were produced. Platform teams should therefore treat the wallet ledger as a product in its own right: something operations can understand, engineering can test and finance can reconcile. Its design begins with events and responsibilities, not a single balance field.

Describe the money states precisely

Define what available, pending, reserved and withdrawn mean within the proposed product. State when a transaction changes each amount and which system is authoritative for that change. Keep promotional entitlements separate from cash accounting where their rules differ. An illustrative withdrawal journey might reserve funds when requested, retain that reservation during review and remove it only after a confirmed outcome. Every alternative path needs an explanation. If a screen uses the word completed while a provider still reports pending, staff and customers will interpret the same transaction differently.

Preserve an explainable history

Design records so an investigator can reconstruct the sequence without editing yesterday’s evidence. Corrections should have their own references and reasons, linked to the original event. Keep the business identifier, external provider reference, currency, amount, event time, processing time and relevant account relationship. Avoid assuming all currencies share the same decimal behaviour. In a review meeting, choose one hypothetical player and walk through a complete day of transactions. Ask whether the displayed balance, transaction list and accounting export can all be derived consistently from the same underlying records.

Test simultaneous and repeated requests

A player may initiate an action from two devices while a provider retries an earlier message. The engineering question is whether the same business event can affect the ledger more than once, or whether two valid events can spend the same available funds. Database transaction isolation is one part of this design; PostgreSQL’s documentation describes the anomalies different isolation levels address. Teams still need deliberate business identifiers, atomic updates and retry behaviour. Review concurrency scenarios explicitly rather than assuming a database transaction automatically solves every distributed-system problem.

Build reconciliation into daily operations

Compare internal movements with provider statements and payment settlement records on a defined schedule. Differences need categories: timing, missing records, duplicate references, amount mismatches and unsupported state transitions. Assign an owner and age to each exception. A dashboard showing total value is insufficient if the team cannot trace a discrepancy to its individual records. Begin with a small reconciliation sample during implementation, then automate repeatable matching. Keep manual decisions visible so a successful total does not conceal unexplained adjustments made to force the numbers into agreement.

Design the investigation experience

Support and finance teams need a readable transaction timeline, appropriate access and a clear route for escalation. A ledger correction should require an authorised workflow with a reason and review proportionate to its impact. The interface should distinguish a customer-facing explanation from restricted internal evidence. For acceptance testing, prepare a scenario pack covering delayed settlement, an interrupted round, repeated callback delivery and a rejected withdrawal. The ledger is ready when the team can explain each outcome and recover appropriately, not merely when the balance widget appears accurate during a normal demonstration.

TAKE IT FORWARD

The key decisions.

  • Define each balance state and its authoritative source.
  • Test duplicate events and concurrency as business scenarios.
  • Make discrepancies traceable before automating reconciliation at scale.

Sources & further reading

Primary references for the concepts discussed. Check the applicable documentation when planning implementation.

  1. PostgreSQL: transaction isolation
  2. OWASP: transaction authorization