Recurring Payments
A recurring payment schedule allows you to setup customers' for automatic billing
on a daily, weekly, fortnightly or monthly basis.
|
eWAY fields Sent
|
Maximum Field Length (Characters)
|
Required Fields
|
|
ewayCustomerID
|
8
|
|
|
CustomerRef
|
20
|
|
|
CustomerTitle
|
20
|
|
|
CustomerFirstName
|
50
|
|
|
CustomerLastName
|
50
|
|
|
CustomerCompany
|
100
|
|
|
CustomerJobDesc
|
50
|
|
|
CustomerEmail
|
50
|
|
|
CustomerAddress
|
255
|
|
|
CustomerSuburb
|
50
|
|
|
CustomerState
|
50
|
|
|
CustomerPostCode
|
6
|
|
|
CustomerCountry
|
50
|
|
|
CustomerPhone1
|
20
|
|
|
CustomerPhone2
|
20
|
|
|
CustomerFax
|
20
|
|
|
CustomerURL
|
255
|
|
|
CustomerComments
|
255
|
|
|
RebillInvRef
|
255
|
|
|
RebillInvDesc
|
255
|
|
|
RebillCCName
|
50
|
|
|
RebillCCNumber
|
19
|
|
|
RebillCCExpMonth
|
2
|
|
|
RebillCCExpYear
|
4
|
|
|
RebillInitAmt
|
10
|
|
|
RebillInitDate
|
10
|
|
|
RebillRecurAmt
|
10
|
|
|
RebillStartDate
|
10
|
|
|
RebillInterval
|
2
|
|
|
RebillIntervalType
|
1
|
|
|
RebillEndDate
|
10
|
|
|
eWAY Fields Returned
|
Maximum Field Length (Characters)
|
Required Fields
|
|
Result
|
6
|
|
|
ErrorSeverity
|
16
|
(If Not Successful)
|
|
ErrorDetails
|
255
|
(If Not Successful)
|
|
eWAY field Name
|
Description
|
|
ewayCustomerID
|
Your unique eWAY customer ID assigned to you when you join eWAY. eg 11438715
|
|
CustomerRef
|
Your own reference number for your customer
|
|
CustomerTitle
|
Your customers title eg. Mr, Mrs, Miss, Dr, Sir etc.
|
|
ewayCustomerFirstName
|
The first name of your customer
|
|
ewayCustomerLastName
|
The last name of your customer
|
|
CustomerCompany
|
The company your customer works for
|
|
CustomerJobDesc
|
Your customers job description/title eg. CEO, Director etc
|
|
CustomerEmail
|
Your customers Email address
|
|
CustomerAddress
|
Your customers physical address
|
|
CustomerSuburb
|
Your customers city/suburb
|
|
CustomerState
|
Your customers State
|
|
CustomerPostCode
|
Your customers PostCode
|
|
CustomerCountry
|
Your customers Country
|
|
CustomerPhone1
|
Your customers Phone Number (Only digit numbers allowed)
|
|
CustomerPhone2
|
Your customers additional phone number (Only digit numbers allowed)
|
|
CustomerFax
|
Your customers fax number (Only digit numbers allowed)
|
|
CustomerURL
|
The URL of your customers website
|
|
CustomerComments
|
Any comments that your customer wishes to add, or you wish to add about the customer
|
|
RebillInvRef
|
A reference to your own invoice system for the purchase. This will appear in the
Invoice Reference Number field of all transactions in this reBILL event.
|
|
RebillInvDesc
|
The description of the products or services purchased. This will appear in the Invoice
Description field of all transactions in this reBILL event.
|
|
RebillCCName
|
The name on your customer's credit card number
|
|
RebillCCNumber
|
Your customer's credit card number
|
|
RebillCCExpMonth
|
The expiry month of your customer's credit card. (Must not be an expired credit
card).
|
|
RebillCCExpYear
|
The expiry year of your customer's credit card. Format must be either (yy or yyyy)
eg. 06 or 2006. (Must not be an expired credit card)
|
|
RebillInitAmt
|
The initial payment amount of the reBILL event. Enter 0 if initial payment is not
required.
|
|
RebillInitDate
|
The date of the initial payment of the reBILL event. Enter today's date if no initial
payment is required. Format must of dd/mm/yyyy.
|
|
RebillRecurAmt
|
The recurring payment amount of the reBILL. The value must be greater than 0.
|
|
RebillStartDate
|
The date of the first recurring payment. Format must of dd/mm/yyyy
|
|
RebillInterval
|
The size of the interval between recurring payments (used in conjunction with RebillIntervalType).
The value must be 1 to 31 only.
|
|
RebillIntervalType
|
The type of Interval. (1 = Days, 2 = Weeks, 3 = Months, 4 = Years). The value must
be only 1 or 2 or 3 or 4.eg Payments every 3 weeks, enter 3 in the RebillInterval
field, and 2 in the RebillIntervalType field.
|
|
RebillEndDate
|
The date that recurring payments are to stop. Format must of dd/mm/yyyy. This date
must be after RebillStartDate.
|
|
Result
|
This returns the status of the reBILL upload. For a successful upload Success is
returned, and for a failed upload False is returned.
|
|
ErrorSeverity
|
If the upload fails, this will return either Error or Warning. This relates to the
XML document passed, but both messages mean that the upload has failed.
|
|
ErrorDetails
|
This returns the XML error description.
|
The following is an example of the XML sent to the eWAY XML reBILL page;
The following is an example of the XML returned after a successful reBILL Upload;
The following is an example of the XML returned after a Failed reBILL Upload;
Webservice
The following methods are available through the reBill Web Service:
For reBill Customer operations:
- Create Rebill Customer
- Update rebill Customer
- Query Rebill Customer
- Delete Rebill Customer
For reBill Event operations:
- Create Rebill Event
- Update Rebill Event
- Query Rebill Event
- Delete Rebill Event
For rebill Transaction operations:
- Query Next Transaction
- Query Transactions
Download the reBill Web Service field definitions and instructions
We have provided sample code for the ASP programming language but if you wish to
link using another language such as Java, ColdFusion etc this can be achieved by
using the eWAY reBILL XML specifications and field definitions.
Basically all you need to do is POST via HTTPS using SSL, the XML document as outlined
below. You then need to parse the returning XML document sent back from eWAY. We
hope to have sample code in more languages in the near future.
- ASP Code
This ZIP file contains the following 3 Active Server Pages:
- 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 and displays the transaction
results.
For more information on passing XML, please see the field specification section.
Download the Rebill XML ASP sample code
- C# .NET
This ZIP file contains the following files:
- Rebill.aspx - This is the form to place on your website, where the reBILL
Customer, initial and recurring payment details will be created / entered. The code
behind then generates the eWAY RebillPayment object and posts to the eWAY reBILL
Gateway.
- Rebill.aspx.cs - The code behind page that generates the eWAY RebillPayment
object and posts to the eWAY reBILL Gateway.
- GatewayConnector.cs - This page connects to the eWAY reBILL gateway, sends
an XML request and receives the XML response.
- RebillPayment.cs - This takes the fields from the Rebill.aspx page and converts
it to an XML string to pass to the GatewayConnector.cs page.
- RebillResponse.cs - This passes the eWAY reBILL gateway response back to
the WebForm1.aspx page.
- Web.config - This is the configuration file for your project, and contains
the GatewayURL to post to, and your eWAY Customer ID. If you are adding the eWAY
reBILL functionality to an existing project, you should add these variables to your
existing Web.Config file.
- Readme.txt - Additional notes on the C# sample code.
For more information on passing XML, please see the field specification section.
Download the C# source code
- VB .NET
This ZIP file contains the following files:
- Rebill.aspx - This is the form to place on your website, where the reBILL
Customer, initial and recurring payment details will be created / entered. The code
behind then generates the eWAY RebillPayment object and posts to the eWAY reBILL
Gateway.
- Rebill.aspx.vb - The code behind page that generates the eWAY RebillPayment
object and posts to the eWAY reBILL Gateway.
- GatewayConnector.vb - This page connects to the eWAY reBILL gateway, sends
an XML request and receives the XML response.
- RebillPayment.vb - This takes the fields from the WebForm1.aspx page and
converts it to an XML string to pass to the GatewayConnector.cs page.
- RebillResponse.vb - This passes the eWAY reBILL gateway response back to
the Rebill.aspx page.
- Web.config - This is the configuration file for your project, and contains
the GatewayURL to post to, and your eWAY Customer ID. If you are adding the eWAY
reBILL functionality to an existing project, you should add these variables to your
existing Web.Config file.
- Readme.txt - Additional notes on the VB.NET sample code.
For more information on passing XML, please see the field specification section.
Download the VB.NET source code
- PHP Code
The zip file contains 6 files (5 files for php5). You can modify these pages as
necessary and are provided FREE of charge:
- Rebill.php - This is the form to place on your website, where the reBILL
Customer, initial and recurring payment details will be created / entered. The code
behind then generates the eWAY RebillPayment object and posts to the eWAY reBILL
Gateway.
- extrafunction.php - only for php4.
- GatewayConnector.php - This page connects to the eWAY reBILL gateway, sends
an XML request and receives the XML response.
- RebillPayment.php - This takes the fields from the rebill.php page and converts
it to an XML string to pass to the GatewayConnector.php page.
- RebillResponse.php - This passes the eWAY reBILL gateway response back to
the rebill.php page.
- Web.Config - This is the configuration file for your project, and contains
the GatewayURL to post to, and your eWAY Customer ID. If you are adding the eWAY
reBILL functionality to an existing project, you should add these variables to your
existing Web.Config file.
For more information on passing XML, please see the field specification section.
Download the PHP4 source code
Download the PHP5 source code
You can build and test recurring payments before joining eWAY. To test your solution
with eWAY, all you need to do is pass the required test account information. This
test facility uses the real payment functionality, so there are very few changes
required once you join eWAY.
These testing instructions make use of the same sample code we provide
for connection to eWAY.
Please make sure you use the following values when testing:
eWAY Recurring Payments Gateway
There is only one gateway to link to for the XML Recurring Solution:
Test Gateway - https://www.eway.com.au/gateway/rebill/test/Upload_test.aspx
Live gateway -
https://www.eway.com.au/gateway/rebill/upload.aspx
eWAY Recurring Webservice
To connect to the Recurring Payments test webservice please use the link below:
Test gateway -
https://www.eway.com.au/gateway/rebill/test/manageRebill_test.asmx
Live gateway -
https://www.eway.com.au/gateway/rebill/manageRebill.asmx