• All transaction should be submitted to this address: https://eye4fraud.com/api/
  • All API requests should use the https:// secure protocol
  • All transactions data should be submitted with a POST
  • Al requests should provide an API login and API security key in order to be processed
Field Description
ApiLogin API login provided by Eye4Fraud
ApiKey API security key provided by Eye4Fraud
TransactionId Transaction ID returned by your payment gateway, such as authorize.net
OrderDate Date and time on which the order occurred. Format: YYYY-MM-DD HH:MM:SS
OrderNumber Merchant’s order number
BillingFirstName Billing first name for the order
BillingMiddleName Billing middle name (if applicable)
BillingLastName Billing last name
BillingCompany Billing company (if applicable)
BillingAddress1 Billing address line 1
BillingAddress2 Billing address line 2
BillingCity Billing city
BillingState Billing state (if applicable)
BillingZip Billing zip
BillingCountry Billing country code. E.g. US, CA, etc.
BillingEveningPhone Billing evening phone
BillingEmail Billing email
IPAddress IP address of the customer’s computer. If the order was taken by phone, set this parameter to 10.1.1.1
ShippingFirstName Shipping first name
ShippingMiddleName Shipping middle name (if applicable)
ShippingLastName Shipping last name
ShippingCompany Shipping company (if applicable)
ShippingAddress1 Shipping address line 1
ShippingAddress2 Shipping address line 2
ShippingCity Shipping city
ShippingState Shipping state (if applicable)
ShippingZip Shipping zip
ShippingCountry Shipping country code, e.g. US, CA, etc.
ShippingEveningPhone Shipping evening phone
ShippingEmail Shipping email
ShippingCost The shipping fee
GrandTotal Grand total for the purchase order
CCType Credit card type – Valid values are VISA,MC,AMEX,DISC,PAYPAL,OTHER
CCFirst6 First 6 digits of the credit card number. Not required if CCType=PAYPAL
CCLast4 Last 4 digits of the credit card number. Not required if CCType=PAYPAL
PayPalPayerID PayPal appends the Payer ID value in the return URL as PayerID. Required only if CCType=PAYPAL
CIDResponse Response Code from auth.net/verisign for The CID also known as CVV2. Examples: M, N, U, P. Not required if CCType=PAYPAL
IMPORTANT: If you are using a gateway that returns two values for AVS (such as Payflow), you need to contact us for instructions.

AVSCode Address verification code. Example: Y, Z, A, X, G, S. Not required if CCType=PAYPAL
LineItems Array of line items for this order. (See below “LineItems Fields”)
Field Description
SiteName Merchant site name provided by Eye4Fraud
CustomerID Merchant’s ID number for the customer
BillingCellPhone Billing cell phone
ShippingMethod Shipping method. Values: 1D, 2D,3D,Other (for 1 Day delivery, 2 Day delivery, 3 Day delivery, or Other, respectively)
ShippingCellPhone Shipping cell phone
CCExpires Credit card expiration date. Format: MM/YY
ReferringCode Merchant’s internal referrer source code. This can be a designated number or a referring URL.
AlternateBillingEmail Alternate billing email
CustomerComments Customer comments
SalesRepComments Comments of the sales rep
InboundCallerID Inbound caller ID
RepeatCustomer For phone orders
HighRiskDeliveryMethod If merchant believes the shipping method choice to be a high risk (e.g. Overnight). True/False
ShippingDeadline Shipping deadline.
Field Status Description
ProductName Required An SKU, or a category of the product, such as “TV”, “Watch”, etc.
ProductDescription Required Description of the line item product, such as “2.8GHz Dell Desktop Computer”
ProductSellingPrice Required Selling price
ProductQty Required Number of items purchased
Response Description
ok The API submit was processed successfully
            <errors>
            <error>Invalid login </error>
            <error>Invalid password</error>
            <error>Authentication failed</error>
            <error>Invalid transaction ID </error>
            <error>Invalid BIN</error>
            <error>OrderDate is required</error>
            <error>BillingFirstName is required </error>
            <error>BillingLastName is required</error>
            <error>BillingAddress1 is required</error>
            <error>IP is invalid value</error>
               ……
               ……
            </errors>
            
All errors are returned as an xml structure with all errors that occurred listed within it.

                <errors>
                   <error>…</error>
                   <error>…</error>
                   …..
                </errors>
                

The following example is based on PHP code version 5 and above.

<?php

// Create an order data array that will be posted to Eye4Fraud API

$post_array = array(
    //////// Required fields //////////////
    'ApiLogin'				=> 'myapilogin',
    'ApiKey'				=> '8ke384dku89oialsi44ijf9',
    'TransactionId'			=> '3457656432',
    'OrderDate'				=> '2012-07-17 13:23:17',
    'OrderNumber'			=> '4523',
    'BillingFirstName'		=> 'John',
    'BillingMiddleName'    	=> 'M',
    'BillingLastName'    	=> 'Doe',
    'BillingCompany'    	=> 'My Company',
    'BillingAddress1'    	=> '1 Street',
    'BillingAddress2'    	=> 'Suite 1',
    'BillingCity'        	=> 'My City',
    'BillingState'        	=> 'NY',
    'BillingZip'        	=> '112233',
    'BillingCountry'    	=> 'US',
    'BillingEveningPhone'   => '111-222-3333',
    'BillingEmail'        	=> 'my@email.com',
    'IPAddress'        		=> ’10.1.1.1’,
    'ShippingFirstName'    	=> 'John',
    'ShippingMiddleName'    => 'M',
    'ShippingLastName'    	=> 'Doe',
    'ShippingCompany'    	=> 'My Company',
    'ShippingAddress1'    	=> '1 Street',
    'ShippingAddress2'    	=> 'Suite 1',
    'ShippingCity'        	=> 'My City',
    'ShippingState'    		=> 'NY',
    'ShippingZip'        	=> '112233',
    'ShippingCountry'    	=> 'US',
    'ShippingEveningPhone'  => '111-222-3333',
    'ShippingEmail'    		=> 'my@email.com',
    'ShippingCost'        	=> 12.50,
    'GrandTotal'        	=> 99.45,
    'CCType'        		=> 'Visa',
    'CCFirst6'        		=> 123456,
    'CCLast4'        		=> 1234,
    'CIDResponse'        	=> 'M',
    'AVSCode'        		=> 'Y',
    'LineItems'        		=> array(
								1 => array(
									'ProductName'    		=> 'Watch',
									'ProductDescription'    => 'Nice watch',
									'ProductSellingPrice'   => 99.99,
									'ProductQty'        	=> 2,
									'ProductCostPrice'    	=> 48.75
									),
								2 => array(
									'ProductName'    		=> 'Bracelet',
									'ProductDescription'    => 'Nice bracelet',
									'ProductSellingPrice'   => 19.99,
									'ProductQty'        	=> 1,
									'ProductCostPrice'    	=> 8.75
									),
								3 => array(
									'ProductName'    		=> 'Hat',
									'ProductDescription'    => 'Nice hat',
									'ProductSellingPrice'   => 29.99,
									'ProductQty'        	=> 1,
									'ProductCostPrice'    	=> 15.00
									)
								),
    /////////// Optional fields /////////////
    'SiteName'        			=> 'MyOnlineStore',
    'CustomerID'        		=> '34566',
    'BillingCellPhone'    		=> '111-222-3333',
    'ShippingMethod'    		=> 'UPS Ground',
    'ShippingCellPhone'    		=> '111-222-3334',
    'CCExpires'        			=> '04/15',
    'ReferringCode'    			=> '233444',
    'AlternateBillingEmail' 	=> 'my@email.com',
    'CustomerComments'    		=> 'Please send soon',
    'SalesRepComments'    		=> 'No comment',
    'InboundCallerID'    		=> '25',
    'RepeatCustomer'    		=> 'No',
    'HighRiskDeliveryMethod'    => 'True',
    'ShippingDeadline'    		=> '2012-07-20',
);

// Convert post array into a query string
$post_query = http_build_query($post_array);

// Do the POST
$ch = curl_init('https://eye4fraud.com/api/');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_query);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);

// Show response
echo $response;
?>

In order to request order status for a specific OrderNumber, send the following POST parameters to: https://eye4fraud.com/api/

Post_Array = array(
	‘ApiLogin’ => “Your ApiLogin provided by Eye4Fraud”,
	‘ApiKey’ => “Your ApiKey provided by Eye4Fraud”,
	‘Action’ => ‘getOrderStatus’,
	‘OrderNumber’  => “ORDER123445”
);

If this request is processed successfully, you will get the following response in XML format:

<response>
	<keyvalue>
		<key>OrderNumber</key>
		<value> ORDER123445</value>
	</keyvalue>
	<keyvalue>
		<key>StatusCode</key>
		<value>U</value>
	</keyvalue>
	<keyvalue>
		<key>Description</key>
		<value>Unprocessed</value>
	</keyvalue>
</response>

Note: The StatusCode and Description values can be one of the following:

StatusCode Description
A Approved
R Review
D Declined
P Pending insurance
U Unprocessed
I Insured
C Canceled
F Fraud
M Missed Fraud
E Empty
W Awaiting response
ERR Error
INV Invalid
ALW Allowed

If there was an API error, such as invalid authentication, invalid Action, or invalid OrderNumber was requested, the response will have this format:

<errors>
	<error>…..</error>
</errors>

PHP Example:

$post_array = array(
	'ApiLogin'		=> 'myapilogin',
	'ApiKey' 		=> '8ke384dku89oialsi44ijf9',
	‘Action’		=> 'getOrderStatus',
	'OrderNumber'	=>’ORDER123456’
);

// Convert post array into a query string
$post_query = http_build_query($post_array);

// Do the POST
$ch = curl_init('https://eye4fraud.com/api/');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_query);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);

// Show response
echo $response;