A timeout tells the caller that a response did not arrive in time. It does not prove that a payment failed. Treating every timeout as permission to start a new payment can turn an unreliable connection into duplicate charges. A resilient integration gives the business operation an identity before sending it and retains that identity throughout retries, status checks and support investigation.
Create the operation before making the call
Persist an internal operation identifier with the amount, currency, account and purpose. Distinguish that business identifier from a single network attempt. Several attempts may belong to the same operation, while a genuinely new purchase needs a new identity. This distinction should be visible in logs and the operations interface.
Generate the provider idempotency key from a controlled operation record, not from whichever browser tab happens to submit first. Keep the original request parameters available for comparison. A retry that changes the amount or destination is a different decision and should not silently reuse the same key.
Respect the provider's exact scope
Read the provider's idempotency behavior for the endpoint being used, including retention, regional scope and error handling. Adyen documents endpoint-specific retry considerations and a defined idempotency mechanism. An application should encode the relevant contract rather than assuming every provider, account or region shares one global duplicate detector.
Keep a local protection against duplicate business processing as well. Provider idempotency does not stop two internal workers from independently crediting a wallet after receiving the same result. The outbound request and the inbound posting each need their own controlled identity and uniqueness rule.
Make uncertainty visible and recoverable
After a timeout, move the operation into an explicit uncertain state. Retrieve status using the supported provider mechanism or wait for an authenticated event. Give the customer a useful message that avoids declaring failure before the outcome is known. A support reference is more helpful than another prominent payment button.
Set an operational deadline for investigation without inventing a final result. If automatic resolution stalls, place the operation in a queue with the original identifiers, attempts and last confirmed state. Staff should be able to resume or reconcile the workflow without recreating it from a screenshot.
Test the response that arrives too late
Simulate a provider completing the payment immediately before the connection drops. Then deliver the delayed event after the application has restarted. Verify that the wallet changes once, the customer sees the final result and the attempt history remains understandable. Also test two browser submissions racing against each other.
Monitor unresolved operations by age and value, not just API error rate. A low number of timeouts can still create a serious support problem if no one owns the remaining uncertainty. Review recovery outcomes periodically and improve the state model wherever staff are forced to guess whether another request is safe.
The key decisions.
- Separate a business payment identity from its individual network attempts.
- Apply idempotency at both provider submission and internal posting boundaries.
- Resolve uncertain outcomes before inviting a new payment attempt.
Sources & further reading
Primary references for the concepts discussed. Check the applicable documentation when planning implementation.







