Treating Payment Timeouts as Failures Can Charge Customers Twice
A software engineering analysis warns that marking mobile money payments as failed after a timeout is a dangerous coding mistake. When a timeout occurs, the payment request may have already reached the operator and the customer could be in the process of approving it, meaning a retry can trigger a duplicate charge. Mobile money APIs like MTN's are asynchronous by design, responding with HTTP 202 Accepted and no transaction status, making the outcome of a timed-out request genuinely ambiguous. The correct approach is to generate a single idempotency key per logical payment before the API call and reuse it across retries, so operators can detect duplicates. After any timeout, developers should query the operator's records for the payment status before attempting a new request rather than assuming failure.
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