eWAY API


Batch

Large volumes of offline credit card orders can be uploaded with data from your own application or system using a .CSV or Excel file.

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
eWAY Field Name Description Example
eWAYTotalAmount A whole number without dollar signs in cents - 10000 equals $100.00. 10000
eWAYCustomerFirstName The customer's first name David
eWAYCustomerLastName The customer's last name McDermott
eWAYCustomerEmail The customer's email address david@eway.co.nz
eWAYCustomerAddress The customer's postal address. 32 Smith Street Sydney NSW
eWAYCustomerPostCode The customer's post code 2000
eWAYCustomerInvoiceRef Your invoice number 234213s
eWAYCustomerInvoiceDescription Your invoice description. 3 x red socks; 2 x blue socks.
eWAYCardHoldersName The card holder's name. David McDermott
eWAYCardNumber The card number. 4534567812345678
eWAYCardExpiryMonth The card expiry month. 04
eWAYCardExpiryYear The card expiry year. 03
eWAYTrxnNumber An optional transaction reference, pass N/A if not used. N/A
eWAYTrxnOption1 An optional parameter,
pass N/A if not used.
N/A
eWAYTrxnOption2 An optional parameter,
pass N/A if not used
N/A
eWAYTrxnOption3 An optional parameter,
pass N/A if not used.
N/A

Batch

eWAY have provided sample batch files in both .csv and .xls formats. These sample files demonstrate how the batch upload should be formatted.


This test facility uses the real payment functionality, so there are very few changes required once you join eWAY.
  • ASP Code
    • This ZIP file contains the following C# Code:

      ePayment.asa - Creates and sends the XML document to eWAY.

      paymentForm.htm - An example of a form to send to the process.asp page. Be sure to include a valid eWAYCustomerID when you go live, this will be issued to you after you join eWAY.

      process.asp - This includes the ePayment.asa file & displays the transaction results

      For more information on passing XML, please see the Simple Link.

  • PHP Code
    • This ZIP file contains the following C# Code:

      ePayment.asa - Creates and sends the XML document to eWAY.

      paymentForm.htm - An example of a form to send to the process.asp page. Be sure to include a valid eWAYCustomerID when you go live, this will be issued to you after you join eWAY.

      process.asp - This includes the ePayment.asa file & displays the transaction results

      For more information on passing XML, please see the Simple Link.

  • C# Code
    • This ZIP file contains the following C# Code:

      ePayment.asa - Creates and sends the XML document to eWAY.

      paymentForm.htm - An example of a form to send to the process.asp page. Be sure to include a valid eWAYCustomerID when you go live, this will be issued to you after you join eWAY.

      process.asp - This includes the ePayment.asa file & displays the transaction results

      For more information on passing XML, please see the Simple Link.

  • Java Code
    • This ZIP file contains the following C# Code:

      ePayment.asa - Creates and sends the XML document to eWAY.

      paymentForm.htm - An example of a form to send to the process.asp page. Be sure to include a valid eWAYCustomerID when you go live, this will be issued to you after you join eWAY.

      process.asp - This includes the ePayment.asa file & displays the transaction results

      For more information on passing XML, please see the Simple Link.