Direct Payments

Direct Payments allows merchants to host their own payment pages, taking credit card payments without ever redirecting customers away from their domain. This can reassure customers and increase conversion rates.

Please note that this functionality is also part of Rapid 3.1 transparent redirect, along with several other features. eWAY recommends Rapid 3.1 for most businesses.

Linking to eWAY

Below are the specifications for using Direct Payments, including descriptions of the fields sent to and returned by our payment gateway. Sandbox testing and Sample code is available from within MYeWAY, along with many other resources for our development partners. Register for free today!

Direct Payments

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

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 Required

Sample XML Sent

A transaction 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> Jackie </ewayCustomerFirstName>       <ewayCustomerLastName> Chan </ewayCustomerLastName>       <ewayCustomerEmail> chan@webactive.com.au </ewayCustomerEmail>       <ewayCustomerAddress> 123 Sesame St </ewayCustomerAddress>       <ewayCustomerPostcode> 2345 </ewayCustomerPostcode>       <ewayCustomerInvoiceDescription> Red socks </ewayCustomerInvoiceDescription>       <ewayCustomerInvoiceRef> 0123 - abc </ewayCustomerInvoiceRef>       <ewayCardHoldersName> Jackie Chan </ewayCardHoldersName>       <ewayCardNumber> 1111222233334444 </ewayCardNumber>       <ewayCardExpiryMonth> 04 </ewayCardExpiryMonth>       <ewayCardExpiryYear> 09 </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 (valid transaction)

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

Sample XML Received (invalid transaction)

<ewayresponse>   <ewayTrxnStatus>False</ewayTrxnStatus>   <ewayTrxnNumber/>   <ewayTrxnReference>987654321</ewayTrxnReference>   <ewayTrxnOption1/>  <ewayTrxnOption2/>   <ewayTrxnOption3/>   <ewayAuthCode/>   <ewayReturnAmount>10</ewayReturnAmount>   <ewayTrxnError>eWAY Error: Invalid Expiry Date. Your credit card has not been  billed for this transaction.</ewayTrxnError> </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.