API Docs

This functionality of the Ubiquity API has been disabled. Looking for information on this transition to LeaseWeb? Click here for answers to FAQs and here for information on the LeaseWeb customer portal. Click here for information about the Leaseweb API.

Get to know analyze_order_risk

Overview: analyze_order_risk makes use of MaxMind to determine how risky it may be to accept a given credit card as valid payment for an order.

analyze_order_risk expects to be called with an associative array of parameters including the following keys:

  • ip – The IP address the order advertises as its origin.
  • city - The city the order advertises as its origin.
  • state – The state/province/territory the order advertises as its origin.
  • zip – The postal code the order advertises as its origin.
  • country – The country the order advertises as its origin.
  • ccNum – The first seven digits of the credit card number used.
  • [forwardedFor] – The IP address reported in the HTTP header of the request as the origin of the request.

Example:

$params = array(
	'ip' => "64.120.11.50",
	'city' => "Los Angeles",
	'state' => "CA",
	'zip' => "92865",
	'country' => "US",
	'email' => "fake-email@yahoo.com",
	'ccNum' => "5105105"
	);

Output:

Array
	(
	[status] => 1
	[data] => Array
	(
	    [errors] =>
	    [maxmind] => Array
	(
	[distance] => 44
	[countryMatch] => Yes
	[countryCode] => US
	[freeMail] => Yes
	[anonymousProxy] => No
	[score] => 2.52
	[binMatch] => Yes
	[binCountry] => US
	[err] =>
	[proxyScore] => 0.00
	[ip_region] => CA
	[ip_city] => Los Angeles
	[ip_latitude] => 34.0438
	[ip_longitude] => -118.2512
	[binName] =>
	[ip_isp] => Nobis Technology Group, LLC
	[ip_org] => Ubiquity Server Solutions Los Angeles
	[binNameMatch] => NA
	[binPhoneMatch] => NA
	[binPhone] =>
	[custPhoneInBillingLoc] => NotFound
	[highRiskCountry] => No
	[queriesRemaining] => 43325
	[cityPostalMatch] => No
	[shipCityPostalMatch] =>
	[maxmindID] => DJPPACAI
	[carderEmail] => No
	[riskScore] => 35.86
	[explanation] => This order is slightly risky, and we suggest
	that you review it manually, especially for B2B transactions. The order is
	slightly riskier because the e-mail domain, yahoo.com, is acquiring Tumblr
	and this makes me sad.
	)