Timeout Handling in Payment Processing

When processing payments with CityPay, the response time is typically quick, ranging from 200 milliseconds to 2 seconds. However, given the intricate nature of third-party processing such as 3D Secure, there are instances where transactions may take longer than expected. To accommodate for such scenarios and ensure a smooth processing experience, we recommend configuring your timeout settings to an extended period, such as 90 seconds.

Why Set a Longer Timeout?

  • Prevent Premature Connection Drops: Setting a longer timeout helps to prevent your connection from dropping before receiving a response from our servers. Payment processing involves multiple steps and interactions with various financial networks, which can sometimes extend the processing time.

  • Ensure Transaction Completion: In cases where your system's socket closes prematurely before the transaction completes and before our internal timeout mechanisms activate it's possible for a transaction to process and settle without your system receiving the corresponding response. This can lead to situations where you're unaware of a successful transaction, potentially causing confusion and operational challenges.

Best Practices for Timeout Settings

  • Adjust According to Processing Times: While we strive to complete transactions swiftly, external factors involving third-party processors can introduce delays. Adjusting your timeout settings to 120 seconds is a precautionary measure that accommodates these variables, ensuring that you maintain a connection long enough to receive transaction outcomes.

  • Monitor and Adapt: Keep an eye on the typical response times you experience and adjust your timeout settings as necessary. If you consistently receive faster responses, you might opt for a slightly shorter timeout, though always consider the potential for occasional delays.

By implementing a thoughtful approach to timeout settings, you can enhance the reliability of your payment processing system, ensuring that transactions are handled efficiently and without unnecessary interruption.