PreAuth

eWAY's PreAuth solution allows merchants to reserve funds on a customer's credit card without charging it. They can then login to MYeWAY and confirm the transaction at their convenience. This service is perfect for merchants whose prices are dependent on variable costs.

Linking to eWAY

The specifications for eWAY's PreAuth product are below. Sample code is available from MYeWAY, along with many other free resources.

PreAuth

The gateway URL is https://www.eway.com.au/gateway_cvn/xmlauth.asp

Pre Auth Specifications


Transaction request
Field Name Maximum Field Length Required?
ewayCustomerID 8 Required
ewayTotalAmount 12 Required
ewayCustomerFirstName 50
ewayCustomerLastName 50
ewayCustomerEmail 50
ewayCustomerAddress 255
ewayCustomerPostcode 6
ewayCustomerInvoiceDescription 255
ewayCustomerInvoiceRef 50
ewayCardHoldersName 50 Required
ewayCardNumber 20 Required
ewayCardExpiryMonth 2 Required
ewayCardExpiryYear 2 Required
ewayTrxnNumber 16
ewayOption1 255
ewayOption2 255
ewayOption3 255
ewayCVN 4

Sample XML Sent

An authorisation request must be sent to the gateway in XML format. Although not all fields are listed as required, you must ensure that all tags are included in the XML, even if they are empty. The XML must be encoded as UTF-8 to be accepted by the gateway and any special characters must be escaped.

<ewaygateway>
  <ewayCustomerID> 87654321 </ewayCustomerID>
  <ewayTotalAmount>10</ewayTotalAmount>
  <ewayCustomerFirstName>Andy</ewayCustomerFirstName>
  <ewayCustomerLastName>Person</ewayCustomerLastName>
  <ewayCustomerEmail>andy.person@acme.com.au</ewayCustomerEmail>
  <ewayCustomerAddress>123 Test Street</ewayCustomerAddress>
  <ewayCustomerPostcode>2345</ewayCustomerPostcode>
  <ewayCustomerInvoiceDescription>Red socks</ewayCustomerInvoiceDescription>
  <ewayCustomerInvoiceRef>0123 - abc</ewayCustomerInvoiceRef>
  <ewayCardHoldersName>Mr Andy Person</ewayCardHoldersName>
  <ewayCardNumber>4444333322221111</ewayCardNumber>
  <ewayCardExpiryMonth>01</ewayCardExpiryMonth>
  <ewayCardExpiryYear>15</ewayCardExpiryYear>
  <ewayTrxnNumber>987654321</ewayTrxnNumber>
   <ewayOption1></ewayOption1>
  <ewayOption2></ewayOption2>
  <ewayOption3></ewayOption3>
  <ewayCVN>123</ewayCVN>
</ewaygateway>

Transaction response
Field Name Maximum Field Length
ewayTrxnError 100
ewayTrxnStatus 6
ewayTrxnNumber 16
ewayTrxnOption1 255
ewayTrxnOption2 255
ewayTrxnOption3 255
ewayReturnAmount 12
ewayAuthCode 6
ewayTrxnReference 50

Sample XML Received

<ewayResponse>
  <ewayTrxnError>00,Transaction Approved</ewayTrxnError>
  <ewayTrxnStatus>True</ewayTrxnStatus>
  <ewayTrxnNumber>1010094</ewayTrxnNumber>
  <ewayTrxnReference>987654321</ewayTrxnReference>
   <ewayReturnAmount>10</ewayReturnAmount>
 <ewayTrxnOption1/>
  <ewayTrxnOption2/>
  <ewayTrxnOption3/>
  <ewayAuthCode>123456</ewayAuthCode>
</ewayResponse>

Sent and received
eWAY Field Name Description
ewayCustomerID Your unique eWAY customer ID assigned to you when you join eWAY. eg 87654321
ewayTotalAmount The total amount in cents for the transaction, eg $1.00 = 100
ewayCustomerFirstName The first name of your customer making a purchase at your site.
ewayCustomerLastName The last name of your customer making a purchase at your site.
ewayCustomerEmail The email address of your customer making a purchase at your site.
ewayCustomerAddress The address of your customer making a purchase at your site including state, city and country.
ewayCustomerPostcode The postcode of your customer making a purchase at your site.
ewayCustomerInvoiceDescription A description of the products or services purchased.
ewayCustomerInvoiceRef A reference to your own invoice system for the purchase.
ewayTrxnReference See 'eWAYTrxnNumber'.
ewayOption1 This value is returned to your website. An additional field for you to pass and receive information from eWAY.
ewayOption2 This value is returned to your website. An additional field for you to pass and receive information from eWAY.
ewayOption3 This value is returned to your website. An additional field for you to pass and receive information from eWAY.
ewayTrxnStatus This value is returned to your website. For a successful transaction "True" is passed and for a failed transaction "False" is passed. This allows you to make your own logging on your website for transaction status.
ewayTrxnNumber This value is returned to your website. You can pass a unique transaction number from your site. You can update and track the status of a transaction when eWAY returns to your site. 
NB. This number is returned as 'ewayTrxnReference'. The number returned as 'ewayTrxnNumber', is actually the unique eWAY Transaction number, created by eWAY itself.
ewayAuthCode If the transaction is successful, this is the bank authorisation number. This is also sent in the email receipt.
eWAYReturnAmount Can be used a check that the transaction is processed for the same amount as you request from your website.
ewayTxnError This is the response returned by the bank, and can be related to both successful and failed transactions.
ewayCVN This is the 3 digit security code found on the back of VISA and MasterCard credit cards, or 4 digit security code found on the front of AMEX cards.