Bug Report: Partial Refunds Misapplied When Orders Have Multiple Captures
A developer discovered a payment processing bug where refunds were incorrectly applied to the wrong capture when a single order had two separate partial captures. The issue arose because the refund request referenced the original authorization ID rather than the specific capture ID, causing the processor to apply the refund to the first capture instead of the intended second one. Although the ledger appeared correct at the order level, item-level refund tracking revealed the mismatch — making the error easy to miss in routine reconciliation. The fix involved storing each capture ID independently and always issuing refunds against the specific capture, not the parent authorization. The developer also noted that processor behavior for unspecified refund targets varies and is rarely documented clearly near refund API endpoints.
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