Skip Navigation LinkseWAY Home » Support » Developer » Real Time Payment(CVN)

Real-Time CVN

eWAY merchants have the option of requesting a Credit Card Verification Number(CVN) from their customers.

XML specification and field definitions - describes the eWAY real time Payments (with CVN) XML document required and the resulting eWAY XML document returned, including field definitions and sample XML documents.
  • Test gateway - https://www.eway.com.au/gateway_cvn/xmltest/testpage.asp - FREE!
  • Live gateway - https://www.eway.com.au/gateway_cvn/xmlpayment.asp - CHARGED PER TRANS

Linking to eWAY
Below are the specifications for using the eWAY XML solution, including linking requirements and field descriptions.

The following table outlines the maximum string lengths that can be passed to the eWAY XML payment page.
If data of greater length is passed then it is truncated.

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 10000  
ewayCustomerInvoiceRef 50  
ewayCardHoldersName 50 Included
ewayCardNumber 20 Included
ewayCardExpiryMonth 2 Included
ewayCardExpiryYear 2 Included
ewayTrxnNumber 16
ewayOption1 255
ewayOption2 255
ewayOption3 255
ewayCVN 3 or 4


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.
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 fronf or AMEX cards.
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 code behind the following XML example for your code. This will result in malformed code, as it is presented here for display purposes only. Please refer to our sample code for more information.

The following is an example of the XML sent to the eWAY XML payment page.

<ewaygateway>
  <ewayCustomerID> 12345678 </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> 424212132325454 </ewayCardNumber>
  <ewayCardExpiryMonth> 04 </ewayCardExpiryMonth>
  <ewayCardExpiryYear> 09 </ewayCardExpiryYear>
  <ewayTrxnNumber> 987654321 </ewayTrxnNumber>
  <ewayCVN> 123 </ewayCVN>
  <ewayOption1></ewayOption1>
  <ewayOption2></ewayOption2>
  <ewayOption3></ewayOption3>
</ewaygateway>

The following is an example of the XML returned after a successful test transaction.
<ewayResponse>
  <ewayTrxnError></ewayTrxnError>
  <ewayTrxnStatus> True </ewayTrxnStatus>
  <ewayTrxnNumber> 10002 </ewayTrxnNumber>
  <ewayTrxnOption1></ewayTrxnOption1>
  <ewayTrxnOption2></ewayTrxnOption2>
  <ewayTrxnOption3></ewayTrxnOption3>
  <ewayReturnAmount> 10 </ewayReturnAmount>
  <ewayAuthCode> 123456 </ewayAuthCode>
  <ewayTrxnReference> 987654321 </ewayTrxnReference>
</ewayResponse>