Should my agent retry a payment after a timeout?
In the signed demo run on a reference gateway with six planted gaps, a missing reply led the gateway to call the provider again after it had already accepted the request. Reserve the request key, record the outcome as unknown and reconcile the original dispatch before deciding whether another is warranted.
Demo run on a reference gateway with six planted gaps. Synthetic data; not a customer result.
Written with an AI assistant from the signed demo run. The run, the gateways and the report were also produced with AI agents.
What the test tried
A payment retried after a timeout when the first one went through.
The provider accepts the first dispatch and loses its reply. The next request repeats the obligation.
Pay USD 250.00 to supplier A → Pay USD 250.00 to supplier A
A provider timeout is recorded as unknown, not retried blindly.
The accepted provider operation loses its reply. Count dispatches and inspect the receipt.
Pay USD 250.00 to supplier A
The simulated provider can accept an instruction and lose its reply on the way back. The duplicate-payment scenario follows what happens when the same obligation comes back to the gateway. The evidence scenario inspects the receipt and the call count for the accepted operation. Together they let a reader examine the decision and its record.
What version 1 did
pay · executed → pay · blocked
The accepted request lost its first reply. The system recorded executed after 2 provider calls.
pay · executed
The accepted request lost its first reply. The system recorded executed after 2 provider calls.
Read the call count as well as the event sequence. The repeated obligation in the duplicate-payment scenario was blocked. The finding concerns the earlier accepted request, for which the gateway recorded execution after calling the provider again. The pack counts calls to a simulated provider. No funds moved.
Why it happens
A timeout tells the caller that it did not receive a usable reply in time. That observation leaves open whether the instruction reached the provider and whether the provider acted on it. Treating silence as a failed payment turns a communication problem into a new decision to send money.
A final status can hide this distinction. A reviewer reading only an executed receipt might reasonably ask what confirmed it. The answer needs to refer to the original dispatch. A later call can return a result without explaining what happened to the earlier instruction or why the gateway made an additional call.
The fix
Reserve the request key, record unknown and reconcile before another dispatch.
Give the obligation a stable request key and reserve it before dispatch. Record that the instruction was sent. If the reply is lost, keep the reservation and record what the gateway knows at that point. An unknown outcome gives a recovery worker something explicit to investigate and keeps a repeated request attached to the same obligation.
Reconciliation means looking for the provider's record of the original instruction. Carry its reference into that lookup. Record the source of any later confirmation and leave the outcome open if the available evidence is inconclusive. A worker looking up an earlier dispatch should be able to do that without issuing a fresh payment.
What version 2 did
Read the unknown outcome together with the recorded call check below. The duplicate-payment scenario also records a block on the repeated obligation. This is a useful distinction for a risk reviewer. The re-test passed while the gateway was still uncertain about the payment.
pay · unknown → pay · blocked
The lost reply is recorded as unknown after exactly one provider call.
pay · unknown
The lost reply is recorded as unknown after exactly one provider call.
How to test it yourself
- Have a simulated provider accept a permitted instruction and suppress its reply. Inspect the gateway's receipt before supplying any later status information.
- Submit the same obligation again while its outcome is unknown. Count actual provider calls alongside the gateway's responses and compare the request references.
- Make the original provider record available for a status lookup. Check that recovery adds the observation to the existing record and preserves the earlier uncertainty.
- Repeat the lookup with no definitive provider record. Check what the operator sees and whether the original reservation still prevents another automatic dispatch.
What evidence to keep
Keep the proposal, its request key, the dispatch history and the receipt in order. Pair the gateway's view with the simulated provider's history so a bank or auditor can distinguish a missing reply from a missing dispatch. If a later observation settles an unknown outcome, preserve its source and the link back to the original obligation.
Use the signed records for both scenarios when discussing the fix. The sample report lets a reader inspect each finding and obtain the pack for offline verification. A single successful-looking receipt leaves out precisely the history this test is designed to preserve.
Read the sample report and verify the signed packFrequently asked questions
Does a payment timeout mean the payment failed?
The provider may have accepted the instruction before its reply was lost. Record the uncertainty and look up the original operation before authorising another dispatch.
What should a duplicate request return during recovery?
Keep it attached to the reserved obligation. In the demo the repeat was blocked while the first request remained unknown, and the provider call count stayed visible.
Can a test pass with the payment outcome still unknown?
Yes. When the reply is lost, the expected behaviour can be to preserve uncertainty and avoid sending again. The signed re-test records exactly that behaviour.