Linking to eWAY


Merchant Hosted Payments

The eWAY Merchant Hosted Payment solution allows you to post an XML document containing customer and payment information to the eWAY payment gateway. This allows customers’ to remain on your website at all times, while processing occurs behind the scenes.

We provide you with an API source code and testing environment to integrate into the eWAY Merchant Hosted Payment solution.

The live gateway URL is: https://www.eway.com.au/gateway/xmlpayment.asp


Linking to eWAY

Below are the specifications for using the eWAY Merchant Hosted Payment solution, including fields sent and returned by the gateway and field descriptions.

eWAY Fields Sent Maximum Field Length (Characters) Required Fields
ewayCustomerID 8 Included
ewayTotalAmount 12 Included
ewayCustomerFirstName 50  
ewayCustomerLastName 50  
ewayCustomerEmail 50  
ewayCustomerAddress 255  
ewayCustomerPostcode 6  
ewayCustomerInvoiceDescription 255  
ewayCustomerInvoiceRef 50  
ewayCardHoldersName 50 Included
ewayCardNumber 20 Included
ewayCardExpiryMonth 2 Included
ewayCardExpiryYear 2 Included
ewayTrxnNumber 16
ewayOption1 255
ewayOption2 255
ewayOption3 255
eWAY Fields Returned Maximum Field Length (Characters) Required Fields
ewayTrxnStatus 6 Included
ewayTrxnNumber 16 Included
ewayTrxnReference 50 Included
ewayTrxnOption1 255 Included
ewayTrxnOption2 255 Included
ewayTrxnOption3 255 Included
ewayAuthCode 6 Included
ewayReturnAmount 12 Included
ewayTrxnError 100 Included
eWAY Field Name Description
ewayCustomerID Your unique eWAY customer ID assigned to you when you join eWAY. eg 11438715
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.

Example XML Layout

Please do not copy/paste the following XML example for your code as it is presented here for display purposes only. Please refer to our source code for more information.

XML Sent

XML Returned

Bookmark and Share