Relay Response

A Relay Response configuration 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 from the transaction information. The custom receipt page is then relayed to the customer's browser.

 

The following table describes form fields that can be submitted in order to configure Relay Response. These settings can also be configured in the Merchant Interface. For more information about configuring Relay Response in the Merchant Interface, please see the Merchant Integration Guide at http://www.authorize.net/support/merchant.

 

The form fields are submitted using the following syntax:

 

<INPUT TYPE=HIDDEN NAME="x_name_of_field" VALUE="value of the field">

 

FIELD NAME

VALUE

FORMAT

NOTES

x_relay_response

The request for a relay response

TRUE

This field instructs the payment gateway to return transaction results to the merchant using an HTML form POST to the merchant's Web server for a relay response.

x_relay_url

The URL on the merchant's Web site to which the payment gateway posts transaction results for a relay response

Any valid URL

 

Including name/value pairs in the URL (anything after a "?") is not recommended

In the event that this field is submitted, the payment gateway will validate the URL value against the Relay Response URL configured in the Merchant Interface. If the URL submitted does not match the URL configured in the Merchant Interface, the transaction will be rejected. If no value is submitted in the HTML Form POST, the payment gateway will post transaction results to the URL configured in the Merchant Interface.

Note: If the merchant would like to use the payment gateway hosted receipt page, the Relay Response fields listed above should not be submitted in the transaction request, nor should they be configured in the Merchant Interface. Requesting both the hosted receipt page and a Relay Response will result in a failed implementation.

The following sample code is an example of including the Relay Response request in the HTML Form POST.

Note: The sample code included in this document uses dummy field values in an ASP scripting environment. Because code varies based on Web programming language, it is not recommended that you copy and paste sample code but rather use it as a guide. Additional sample code is available for download from the Authorize.Net Integration Center at http://developer.authorize.net/samplecode.

Sample of payment form request including Relay Response request

 

 

<!--#INCLUDE FILE="simlib.asp"-->
<FORM METHOD=POST ACTION=
"https://secure.authorize.net/gateway/transact.dll">
<% ret = InsertFP (APIloginid, sequence, amount, txnkey) %>
<INPUT TYPE=HIDDEN NAME="x_login" VALUE="the merchant's API Login ID">
<INPUT TYPE=HIDDEN NAME="x_version" VALUE="3.1">
<INPUT TYPE=HIDDEN NAME="x_method" VALUE="CC">
<INPUT TYPE=HIDDEN NAME="x_show_form" VALUE="PAYMENT_FORM">
<INPUT TYPE=HIDDEN NAME="x_amount" VALUE="9.95">
<INPUT TYPE=HIDDEN NAME="x_relay_response" VALUE="TRUE">
<INPUT TYPE=HIDDEN NAME="x_relay_url" VALUE="Any valid URL">
<INPUT TYPE=SUBMIT VALUE="Click here for the secure payment form">
</FORM>

 

 

When Authorize.Net sends a Relay Response to the merchant's server, if the merchant's web server does not send a positive response after ten seconds, then the connection will time-out and an error is generated for the transaction.

If the merchant would like to use transaction response information for purposes other than creating a custom receipt page, such as integration with proprietary business processes or applications, a Silent Post URL can be configured in the Merchant Interface. The Silent Post URL is a location on the merchant's Web server where the payment gateway can "carbon copy" the transaction information. This allows the merchant to use transaction response information for other purposes separately without affecting the amount of time it takes to respond to the payment gateway with a custom receipt page. Relay Response is the intended and recommended method of collecting transaction response data.

Note: The Silent Post feature can only be configured in the Merchant Interface. There is no API field for the Silent Post URL. For information on how to configure the Silent Post URL in the Merchant Interface, see the Merchant Integration Guide at http://www.authorize.net/support/merchant.

Please be aware that the Silent Post URL does not function the same as the Relay Response URL. Once the payment gateway posts the transaction response to the Silent Post URL, the communication is complete. To receive payment or event notification, use Relay Response, because Silent Posts are neither logged nor monitored. The receipt of Silent Post responses are not tracked, and there is no notification in case of a failed receipt of Silent Post responses.

Note: Authorize.Net only posts the Silent Post on port 80.

Tips for using Relay Response:

 

Related Topics