This article dissects the distributed systems problem inherent in card payments: the eventual consistency between an authorized amount and the settled amount. It highlights how this 24-72 hour divergence creates user confusion, especially with estimated authorizations and low-slack balances common in crypto cards. The piece explores architectural mitigations like balance headroom and partitioning, and discusses the lack of user observability into these critical financial states.
Read original on Dev.to #systemdesignCard transactions are fundamentally a distributed systems challenge due to their two-phase nature: authorization and settlement. This creates an eventually consistent state for a user's available balance, which often leads to confusion and support issues because most user interfaces (UIs) don't explicitly communicate this lag. Understanding this pattern is crucial for designing reliable financial systems.
A card transaction is not atomic, involving two distinct events separated by time:
Eventually Consistent Reads
The period between authorization and settlement is a classic example of an eventually consistent read. The user's UI often reflects a state (the reserved available balance) that has not yet caught up to the final settled state, effectively querying a 'replica' that is still stale without proper labeling.
Merchants in categories like hotels, car rentals, or restaurants often authorize an estimated amount, which is higher than the final settlement. While network rules require merchants to reverse the excess, this reversal happens on the merchant's schedule, not the cardholder's. This means a user's available balance can be significantly decremented by an amount they didn't explicitly agree to, for an extended period, and corrected without notification. This problem is amplified in systems where users maintain minimal balance slack, such as many crypto card setups, leading to unexpected declines.
The article critically notes the lack of observability for the end-user. While `available_balance` is computed and known by the merchant, issuer, and network, the cardholder (who experiences the consequences) receives generic declines without correlation IDs or causal links. This represents a solvable surfacing problem where incentives are currently misaligned, highlighting a common source of friction in payment systems.