Showing results for 
Search instead for 
Did you mean: 

Relay Reponse Timeout prevention

I think I've read all the posts concerning this topic but I have not seen any concrete examples on how to prevent it, only general advise.  Based on what I've read, I need to set up my response page to process as follows:


1. Get transaction response values
2. Initiate HTTP post to render the reponse form with a "Processing, please wait." message
3. Bind transaction response values to form
4. Configure and send emails
5. Write transaction response values to database

6. Finish form post.


Step 2 is obviously the key in preventing the timeout. I'm a C# developer who's never gotten around to learning AJAX but I suspect this step would involve some AJAX code.  All the examples I've been able to find on the web and in an AJAX book I bought involve some user interaction to initiate the event that would present the "Processing..." message.  For the relay response, I don't know how to go about this.  I also am not sure how to finish the process with step 6.   I'm not asking for detailed code to do this.  I can probably figure that out myself.  What I'm asking for is some detail on the process of doing what needs to be done in steps 2 & 6 (what objects/methods to use, etc.)   Can anyone help?  Surely, somone has done this.  I'll certainly share my "timeout prevention" solution on this forum once I get it to work. 



I forgot to mention, I'm using SIM.  I should also mention I've been using my code to support an ecommerce site since January.  The timeout issue doesn't happen a lot (1 in 20 transactions maybe) but it is a nuisance. I have to respond to customer questions everytime it happens.


Hi jasco,


If you are only seeing timeouts occur only every once in awhile it is unlikely to be due to the method you have used to integrate SIM. It is more than likely due to processes that are running on your server that are preventing your page from accepting the relay response within 10 seconds or factors related to your ISP, webhost or server load. The Authorize.Net online knowledgebase, located at, has this to say about SIM timeouts:


Relay Response is applicable to merchants using Server Integration Method (SIM) or Simple Checkout. It instructs the payment gateway to return transaction results to the merchant using an HTML form POST to a specified URL on the merchant's Web server. A script or program at the URL can be used to create a custom receipt page using the transaction information. The custom receipt page is then relayed back to the customer's browser. Relay Response does not redirect the end user back to your server, but relays your specified Relay URL to the end user through your receipt page instead of displaying our default receipt page.
When Relay Response is unable to pass the transaction response to your server or software, your customer will see the following message:
An error occurred while trying to report this transaction to the merchant. An e-mail has been sent to the merchant informing them of the error. The following is a result of the attempt to charge your credit card.
This response would be followed by the transaction response text we originally submitted to your software or website. If the merchant has chosen to receive transaction receipts from Authorize.Net, we will also send an e-mail with the subject “Transaction Error Notification” to the merchant. The e-mail starts with this text:
Your script timed out while we were trying to post transaction results to it.
Transaction ID: 9876543210
Transaction Result: This transaction has been approved.
If the transaction was successfully authorized and captured for settlement, it will settle and the merchant will receive funding for the transaction. The merchant should contact the customer and make sure their order is completed successfully.
There are a number of possible causes for this issue. If it only happens on rare occasion, but the bulk of your transactions process without problems, then your network might have had a temporary lag or connection failure. These sorts of issues would be outside Authorize.Net’s control, but should also be very rare as long as your network is generally stable and reliable.
If your Relay Response timeouts occur repeatedly but sporadically, or if the error only occurs in short bursts, then you may want to consult with your Web hosting company or Internet Service Provider (ISP) to find out if there are any issues which might cause Internet connections to drop or time out. Possible causes include occasional Web server load spikes, routing or load balancing issues, and Internet congestion.
Note that Relay Response connections may time out after 10 seconds, so it is important that we receive an acknowledgement that your server received our response in 10 seconds or less.
If you encounter this issue every time, check the following list of possible causes and make corrections as needed:
  • Check that the Relay URL your website is using (x_relay_url) is spelled correctly and is pointed at the right Web page or script. Any typing errors will send the transaction response to a file that doesn’t exist on your server.
  • Confirm that you can load the Relay URL in a Web browser, and that it runs successfully. If you encounter a 500 Internal Server Error message, your script cannot run on the server and you may need to check your coding and confirm that the Web server can run the script correctly.
  • If your Web server is not available on the public Internet, has authentication enabled, or if the Relay URL uses a non-standard port for HTTP or HTTPS traffic, Relay Response timeouts will occur. Authorize.Net will not have any means to connect to your server or authenticate itself on your server, and can only use ports 80 and 443 for all Web traffic.
  • Log into the Merchant Interface at, click Account from the top navigation, click Response/Receipt URLs, and review the settings to ensure that the correct Relay Response URL is configured.
Make sure your script has completely received the transaction response before it performs any intensive tasks such as writing the response data to a database. If you start any intensive tasks while waiting for Relay Response to finish, your server may not be able to receive the full transaction response before the connection times out.
Thank you,
Trusted Contributor
Trusted Contributor

Elaine, I appreciate your lengthy response.  I have researched this issue as thoroughly as I know how and have already read most all of what you had to say in documentation I’ve looked at and in the various posts on this subject in this forum.  I should have made that clear in my original post.


I realize that the web hosting server may occasionally have issues that cause a relay response to timeout.  But because I cannot stop the timeout email from going to the customer (because I want to receive a receipt myself), I end up having to reassure every customer who receives the timeout email (even though they received their receipt from Authorize.Net) that their transaction was successful.   


The last paragraph of your reply gets to the heart of my inquiry. I don't have control over the server's occasional issues that cause a timeout but I can do something about the way my relay response page processes in order to mitigate the possibility of a timeout. If I can immediately send a response with a “processing, please wait” message and then perform the database writes I should be able to beat the 10 second clock unless the server is really having problems.  I would be happy if this would cut down even a fourth of the timeouts.


I’ve seen that last paragraph stated many times in this forum but never with an example of how to do it. The best statement I’ve see concerning this says, “It is very important that something prints to the screen before any other process is started. If your script prints to the screen first, Authorize.Net will recognize that you are receiving the information. The most effective method would be to PRINT the headers, and a line of text such as "Processing, please wait."”


As I mentioned in my original post, AJAX might be a solution but I’m not real sure of how to code it.  Your site has plenty of examples on everything else associated with processing a transaction but nothing about how to submit the relay response as described above.  Surely someone on this forum knows how to do this.  Considering the number of posts on this topic, it is certainly worth someone's effort to provide an example.



I am also interested in a solution to this.

Hi Jeff,


We obviously don't have any examples of how to do this, but you're right, someone else may. I'd recommend subscribing to this topic so that you'll be alerted via email if anyone else from the community is able to respond with any feedback. To subscribe, click Topic Options at the top of this thread and then select Subscribe. You'll then receive an email once anyone replies to your post.





Developer Community Manager