Beagle Anti-fraud


Beagle uses GEO-IP rules to block or flag potential fraudulent transactions. Rules are declared within MYeWAY and notifications are sent via e-mail for any transactions that do not pass the Anti-Fraud rules.

Linking to eWAY

Beagle is integrated by passing two additional fields (IP address and country code) while using Merchant Hosted Payments or our Token solution.

Sample code and sandbox testing are available from MYeWAY, along with many other free resources for our registered development partners.


Beagle Anti-fraud

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


Transaction request
Field name Maximum 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
ewayCustomerIPAddress 15 Required
ewayCustomerBillingCountry 2 Required

Sample XML Sent

Transaction requests must be sent to the gateway in UTF-8 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. Special characters must be escaped.

<ewaygateway>
  <ewayCustomerID>12345678</ewayCustomerID>
  <ewayTotalAmount>10</ewayTotalAmount>
  <ewayCustomerFirstName>Andy</ewayCustomerFirstName>
  <ewayCustomerLastName>Person</ewayCustomerLastName>
  <ewayCustomerEmail>andy.person@acme.com.au</ewayCustomerEmail>
  <ewayCustomerAddress>123 Test Street</ewayCustomerAddress>
  <ewayCustomerPostcode>2345</ewayCustomerPostcode>
  <ewayCustomerInvoiceDescription>Red socks</ewayCustomerInvoiceDescription>
  <ewayCustomerInvoiceRef>0123 - abc</ewayCustomerInvoiceRef>
  <ewayCardHoldersName>Mr Andy Person</ewayCardHoldersName>
  <ewayCardNumber>4444333322221111</ewayCardNumber>
  <ewayCardExpiryMonth>01</ewayCardExpiryMonth>
  <ewayCardExpiryYear>15</ewayCardExpiryYear>
  <ewayTrxnNumber>987654321</ewayTrxnNumber>
  <ewayOption1></ewayOption1>
  <ewayOption2></ewayOption2>
  <ewayOption3></ewayOption3>
  <ewayCVN>123</ewayCVN>
  <ewayCustomerIPAddress>74.125.71.103</ewayCustomerIPAddress>
  <ewayCustomerBillingCountry>AU</ewayCustomerBillingCountry>
</ewaygateway>

Transaction response
Field Name Maximum Length
ewayTrxnError 100
ewayTrxnStatus 6
ewayTrxnNumber 16
ewayTrxnOption1 255
ewayTrxnOption2 255
ewayTrxnOption3 255
ewayReturnAmount 12
ewayAuthCode 6
ewayTrxnReference 50
ewayBeagleScore 6

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>
  <ewayBeagleScore>0.08</ewayBeagleScore>
</ewayResponse>

SampleXML 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>
  <ewayBeagleScore/>
</ewayResponse>

Field name Description
ewayCustomerID The unique eWAY customer ID assigned to you when you joined eWAY. eg 11438715
ewayTotalAmount The total amount in cents for the transaction, eg $1.00 = 100
ewayCustomerFirstName The first name of the customer making a purchase at your site.
ewayCustomerLastName The last name of the customer making a purchase at your site.
ewayCustomerEmail The email address of the customer making a purchase at your site.
ewayCustomerAddress The address of the customer making a purchase at your site including state, city and country.
ewayCustomerPostcode The postcode of the 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 unchanged. An additional field for you to pass and receive information from eWAY.
ewayOption2 This value is returned to your website unchanged. An additional field for you to pass and receive information from eWAY.
ewayOption3 This value is returned to your website unchanged. 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.
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.
ewayBeagleScore Fraud score representing the estimated probability that the order is fraud, based on past Beagle transactions.

In order for merchants to utilise the Beagle Anti-fraud service, the following fields also need to be passed to our payment gateway:


ewayCustomerIPAddress

This field is used to pass the IP address of the customer making the purchase. This assists in detecting fraudulent behaviour by allowing Beagle to pinpoint the physical location of the computer that the customer is using for the transaction. This field allows Beagle to check the computer's location against the country of the credit card issuing bank, as well as the billing country as entered by the customer themselves. If these do not match, the transaction may be fraudulent.

Beagle also checks this field against our database of known anonymous and high risk IPs. Anonymous IP addresses are used by people to 'fake' their actual physical location, and get around geolocational checking.

Field Specification
The customer's IP address is made up of four numbers (each up to three digits long), separated by decimal points. e.g. 202.58.56.1

This information can easily be retrieved by your web developer, as it is available in the Server Variables of each Web page request, which can be accessed by most programming languages.


ewayCustomerBillingCountry

This field is used to pass a two-character country code, which relates to the billing address which was entered by the customer making the purchase. This is used by Beagle to match against both the country of the IP address and the country associated with the credit card issuing bank. If these do not match, the transaction may be fraudulent.

Field Specification
The billing country code is made up of two characters which correspond to a particular country.

To assist with your integration, we have created a list of all countries and their country code:

<select name="countries">
    <option value=">Unknown</option>
    <option value="AP">Asia/Pacific Region</option>
    <option value="EU">Europe</option>
    <option value="AD">Andorra</option>
    <option value="AE">United Arab Emirates</option>
    <option value="AF">Afghanistan</option>
    <option value="AG">Antigua and Barbuda</option>
    <option value="AI">Anguilla</option>
    <option value="AL">Albania</option>
    <option value="AM">Armenia</option>
    <option value="AN">Netherlands Antilles</option>
    <option value="AO">Angola</option>
    <option value="AQ">Antarctica</option>
    <option value="AR">Argentina</option>
    <option value="AS">American Samoa</option>
    <option value="AT">Austria</option>
    <option value="AU">Australia</option>
    <option value="AW">Aruba</option>
    <option value="AZ">Azerbaijan</option>
    <option value="BA">Bosnia and Herzegovina</option>
    <option value="BB">Barbados</option>
    <option value="BD">Bangladesh</option>
    <option value="BE">Belgium</option>
    <option value="BF">Burkina Faso</option>
    <option value="BG">Bulgaria</option>
    <option value="BH">Bahrain</option>
    <option value="BI">Burundi</option>
    <option value="BJ">Benin</option>
    <option value="BM">Bermuda</option>
    <option value="BN">Brunei Darussalam</option>
    <option value="BO">Bolivia</option>
    <option value="BR">Brazil</option>
    <option value="BS">Bahamas</option>
    <option value="BT">Bhutan</option>
    <option value="BV">Bouvet Island</option>
    <option value="BW">Botswana</option>
    <option value="BY">Belarus</option>
    <option value="BZ">Belize</option>
    <option value="CA">Canada</option>
    <option value="CC">Cocos (Keeling) Islands</option>
    <option value="CD">Congo, The Democratic Republic of the</option>
    <option value="CF">Central African Republic</option>
    <option value="CG">Congo</option>
    <option value="CH">Switzerland</option>
    <option value="CI">Cote D'Ivoire</option>
    <option value="CK">Cook Islands</option>
    <option value="CL">Chile</option>
    <option value="CM">Cameroon</option>
    <option value="CN">China</option>
    <option value="CO">Colombia</option>
    <option value="CR">Costa Rica</option>
    <option value="CU">Cuba</option>
    <option value="CV">Cape Verde</option>
    <option value="CX">Christmas Island</option>
    <option value="CY">Cyprus</option>
    <option value="CZ">Czech Republic</option>
    <option value="DE">Germany</option>
    <option value="DJ">Djibouti</option>
    <option value="DK">Denmark</option>
    <option value="DM">Dominica</option>
    <option value="DO">Dominican Republic</option>
    <option value="DZ">Algeria</option>
    <option value="EC">Ecuador</option>
    <option value="EE">Estonia</option>
    <option value="EG">Egypt</option>
    <option value="EH">Western Sahara</option>
    <option value="ER">Eritrea</option>
    <option value="ES">Spain</option>
    <option value="ET">Ethiopia</option>
    <option value="FI">Finland</option>
    <option value="FJ">Fiji</option>
    <option value="FK">Falkland Islands (Malvinas)</option>
    <option value="FM">Micronesia, Federated States of</option>
    <option value="FO">Faroe Islands</option>
    <option value="FR">France</option>
    <option value="FX">France, Metropolitan</option>
    <option value="GA">Gabon</option>
    <option value="GB">United Kingdom</option>
    <option value="GD">Grenada</option>
    <option value="GE">Georgia</option>
    <option value="GF">French Guiana</option>
    <option value="GH">Ghana</option>
    <option value="GI">Gibraltar</option>
    <option value="GL">Greenland</option>
    <option value="GM">Gambia</option>
    <option value="GN">Guinea</option>
    <option value="GP">Guadeloupe</option>
    <option value="GQ">Equatorial Guinea</option>
    <option value="GR">Greece</option>
    <option value="GS">South Georgia and the South Sandwich Islands</option>
    <option value="GT">Guatemala</option>
    <option value="GU">Guam</option>
    <option value="GW">Guinea-Bissau</option>
    <option value="GY">Guyana</option>
    <option value="HK">Hong Kong</option>
    <option value="HM">Heard Island and McDonald Islands</option>
    <option value="HN">Honduras</option>
    <option value="HR">Croatia</option>
    <option value="HT">Haiti</option>
    <option value="HU">Hungary</option>
    <option value="ID">Indonesia</option>
    <option value="IE">Ireland</option>
    <option value="IL">Israel</option>
    <option value="IN">India</option>
    <option value="IO">British Indian Ocean Territory</option>
    <option value="IQ">Iraq</option>
    <option value="IR">Iran, Islamic Republic of</option>
    <option value="IS">Iceland</option>
    <option value="IT">Italy</option>
    <option value="JM">Jamaica</option>
    <option value="JO">Jordan</option>
    <option value="JP">Japan</option>
    <option value="KE">Kenya</option>
    <option value="KG">Kyrgyzstan</option>
    <option value="KH">Cambodia</option>
    <option value="KI">Kiribati</option>
    <option value="KM">Comoros</option>
    <option value="KN">Saint Kitts and Nevis</option>
    <option value="KP">Korea, Democratic People's Republic of</option>
    <option value="KR">Korea, Republic of</option>
    <option value="KW">Kuwait</option>
    <option value="KY">Cayman Islands</option>
    <option value="KZ">Kazakstan</option>
    <option value="LA">Lao People's Democratic Republic</option>
    <option value="LB">Lebanon</option>
    <option value="LC">Saint Lucia</option>
    <option value="LI">Liechtenstein</option>
    <option value="LK">Sri Lanka</option>
    <option value="LR">Liberia</option>
    <option value="LS">Lesotho</option>
    <option value="LT">Lithuania</option>
    <option value="LU">Luxembourg</option>
    <option value="LV">Latvia</option>
    <option value="LY">Libyan Arab Jamahiriya</option>
    <option value="MA">Morocco</option>
    <option value="MC">Monaco</option>
    <option value="MD">Moldova, Republic of</option>
    <option value="MG">Madagascar</option>
    <option value="MH">Marshall Islands</option>
    <option value="MK">Macedonia, the Former Yugoslav Republic of</option>
    <option value="ML">Mali</option>
    <option value="MM">Myanmar</option>
    <option value="MN">Mongolia</option>
    <option value="MO">Macau</option>
    <option value="MP">Northern Mariana Islands</option>
    <option value="MQ">Martinique</option>
    <option value="MR">Mauritania</option>
    <option value="MS">Montserrat</option>
    <option value="MT">Malta</option>
    <option value="MU">Mauritius</option>
    <option value="MV">Maldives</option>
    <option value="MW">Malawi</option>
    <option value="MX">Mexico</option>
    <option value="MY">Malaysia</option>
    <option value="MZ">Mozambique</option>
    <option value="NA">Namibia</option>
    <option value="NC">New Caledonia</option>
    <option value="NE">Niger</option>
    <option value="NF">Norfolk Island</option>
    <option value="NG">Nigeria</option>
    <option value="NI">Nicaragua</option>
    <option value="NL">Netherlands</option>
    <option value="NO">Norway</option>
    <option value="NP">Nepal</option>
    <option value="NR">Nauru</option>
    <option value="NU">Niue</option>
    <option value="NZ">New Zealand</option>
    <option value="OM">Oman</option>
    <option value="PA">Panama</option>
    <option value="PE">Peru</option>
    <option value="PF">French Polynesia</option>
    <option value="PG">Papua New Guinea</option>
    <option value="PH">Philippines</option>
    <option value="PK">Pakistan</option>
    <option value="PL">Poland</option>
    <option value="PM">Saint Pierre and Miquelon</option>
    <option value="PN">Pitcairn</option>
    <option value="PR">Puerto Rico</option>
    <option value="PS">Palestinian Territory, Occupied</option>
    <option value="PT">Portugal</option>
    <option value="PW">Palau</option>
    <option value="PY">Paraguay</option>
    <option value="QA">Qatar</option>
    <option value="RE">Reunion</option>
    <option value="RO">Romania</option>
    <option value="RU">Russian Federation</option>
    <option value="RW">Rwanda</option>
    <option value="SA">Saudi Arabia</option>
    <option value="SB">Solomon Islands</option>
    <option value="SC">Seychelles</option>
    <option value="SD">Sudan</option>
    <option value="SE">Sweden</option>
    <option value="SG">Singapore</option>
    <option value="SH">Saint Helena</option>
    <option value="SI">Slovenia</option>
    <option value="SJ">Svalbard and Jan Mayen</option>
    <option value="SK">Slovakia</option>
    <option value="SL">Sierra Leone</option>
    <option value="SM">San Marino</option>
    <option value="SN">Senegal</option>
    <option value="SO">Somalia</option>
    <option value="SR">Suriname</option>
    <option value="ST">Sao Tome and Principe</option>
    <option value="SV">El Salvador</option>
    <option value="SY">Syrian Arab Republic</option>
    <option value="SZ">Swaziland</option>
    <option value="TC">Turks and Caicos Islands</option>
    <option value="TD">Chad</option>
    <option value="TF">French Southern Territories</option>
    <option value="TG">Togo</option>
    <option value="TH">Thailand</option>
    <option value="TJ">Tajikistan</option>
    <option value="TK">Tokelau</option>
    <option value="TM">Turkmenistan</option>
    <option value="TN">Tunisia</option>
    <option value="TO">Tonga</option>
    <option value="TP">East Timor</option>
    <option value="TR">Turkey</option>
    <option value="TT">Trinidad and Tobago</option>
    <option value="TV">Tuvalu</option>
    <option value="TW">Taiwan, Province of China</option>
    <option value="TZ">Tanzania, United Republic of</option>
    <option value="UA">Ukraine</option>
    <option value="UG">Uganda</option>
    <option value="UM">United States Minor Outlying Islands</option>
    <option value="US">United States</option>
    <option value="UY">Uruguay</option>
    <option value="UZ">Uzbekistan</option>
    <option value="VA">Holy See (Vatican City State)</option>
    <option value="VC">Saint Vincent and the Grenadines</option>
    <option value="VE">Venezuela</option>
    <option value="VG">Virgin Islands, British</option>
    <option value="VI">Virgin Islands, U.S.</option>
    <option value="VN">Vietnam</option>
    <option value="VU">Vanuatu</option>
    <option value="WF">Wallis and Futuna</option>
    <option value="WS">Samoa</option>
    <option value="YE">Yemen</option>
    <option value="YT">Mayotte</option>
    <option value="YU">Yugoslavia</option>
    <option value="ZA">South Africa</option>
    <option value="ZM">Zambia</option>
    <option value="ZR">Zaire</option>
    <option value="ZW">Zimbabwe</option>
    <option value="A1">Anonymous Proxy</option>
    <option value="A2">Satellite Provider</option>
</select>