Fencing stalled payment retries to prevent double debits on a mobility platform
Eric Gitangu, an engineer at a mobility and fintech platform, describes how a trip payment that stalls partway through can leave the charge stuck in a claimed state. Because paying involves several separate writes with no wrapping transaction, the design relies on a strict ordering of steps. A retry must be able to take over a stalled claim, but it first has to determine whether the original debit happened, answering yes, provably no, or cannot tell. Testing revealed a flaw: a stalled original attempt could wake up after a takeover and debit the wallet a second time. The fix is a one-time marker that only one of the two competing attempts can claim before debiting or charging, so whichever goes first wins and the other moves no money.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in