Developer Guide

Get Order Result

Retrieve an existing transaction from FraudLabs Pro fraud detection system.

Please take note that this API is only available for paid plan. Please upgrade your plan to use it if you are currently subscribed to a Micro plan.

Request

GET  https://api.fraudlabspro.com/v2/order/result
Parameter Description
id (required) Unique transaction ID generated by Fraud Check API. Or order ID generated by your platform.
key (required) API license key.
format (optional) Return the result in json or xml format. Default:xml
Valid values: json | xml

Response

Parameter Description
ip_geolocation.ip IP address of the transaction.
ip_geolocation.continent Estimated continent of the IP address.
ip_geolocation.country_code Estimated ISO-3166 alpha-2 country code of the IP address.
ip_geolocation.country_name Estimated country of the IP address.
ip_geolocation.region Estimated region of the IP address.
ip_geolocation.city Estimated city of the IP address.
ip_geolocation.latitude Estimated latitude of the IP address in 4 precisions.
ip_geolocation.longitude Estimated longitude of the IP address in 4 precisions.
ip_geolocation.zip_code Estimated ZIP code of the IP address.
ip_geolocation.timezone Estimated timezone of the IP address.
ip_geolocation.isp_name Estimated ISP name of the IP address.
ip_geolocation.domain Estimated domain name of the IP address.
ip_geolocation.netspeed Estimated netspeed of the IP address.
ip_geolocation.mobile_mnc Estimated mobile mnc information of the IP address, if it is a mobile network.
ip_geolocation.mobile_mcc Estimated mobile mcc information of the IP address, if it is a mobile network.
ip_geolocation.mobile_brand Estimated mobile brand information of the IP address, if it is a mobile network.
ip_geolocation.elevation Estimated elevation of the IP address.
ip_geolocation.usage_type Estimated usage type of the IP address. Return values as below:
  • Commercial
  • Organization
  • Government
  • Military
  • University/College/School
  • Library
  • Content Delivery Network
  • Fixed Line ISP
  • Mobile ISP
  • Data Center/Web Hosting/Transit
  • Search Engine Spider
ip_geolocation.is_proxy Whether the IP address is from a known anonymous proxy server.
ip_geolocation.is_in_blacklist Whether the IP address is in our blacklist database.
billing_address.distance_in_km Distance of location between IP address and bill. Value in kilometer.
billing_address.distance_in_mile Distance of location between IP address and bill. Value in mile.
billing_address.is_ip_country_match Whether country of IP address matches billing address country.
shipping_address.is_address_ship_forward Whether the shipping address is in database of known mail drops.
shipping_address.is_bill_city_match Whether the billing city matches the shipping city.
shipping_address.is_bill_state_match Whether the billing state matches the shipping state.
shipping_address.is_bill_country_match Whether the billing country matches the shipping country.
shipping_address.is_bill_postcode_match Whether the billing postal/zip code matches the shipping postal/zip code.
shipping_address.is_export_controlled_country Whether the country is from an embargoed country.
shipping_address.is_in_blacklist Whether the ship address is in our blacklist database.
email_address.is_free Whether the email is from free email provider.
email_address.is_disposable Whether the email is a disposable email. Only applicable for Small Plan onward.
email_address.is_domain_exists Whether the email domain name is a valid domain.
email_address.is_new_domain_name Whether the email domain name a newly registered name. Only applicable for non-free email domain.
email_address.is_in_blacklist Whether the email address is in our blacklist database.
phone_number.is_disposable Whether the phone number is a disposable phone number. Only applicable for Medium Plan onward.
phone_number.is_in_blacklist Whether the user's phone number is in our blacklist database.
username.is_high_risk Whether the username is in our high risk database.
username.is_in_blacklist Whether the username is in our blacklist database.
credit_card.card_brand The brand of the card.
Available on Medium plan onward only.
credit_card.card_type Whether the card is a type of credit or debit.
Available on Medium plan onward only.
credit_card.card_issuing_bank The name of the bank where the card being issued.
Available on Medium plan onward only.
credit_card.card_issuing_country The ISO-3166 alpha-2 Country Codes where the card being issued.
Available on Medium plan onward only.
credit_card.is_prepaid Whether the credit card is a type of prepaid card.
credit_card.is_bin_exist Whether the BIN information matches our BIN list.
credit_card.is_bin_country_match Whether the country of issuing bank matches BIN country code.
credit_card.is_in_blacklist Whether the credit card is in our blacklist database.
device.is_malware_exploit Whether the machine is infected.
device.is_in_blacklist Whether the device Id is in our blacklist database.
user_order_id Return the order identifier given by merchant earlier.
fraudlabspro_id System own unique identifier to identify this API transaction.
fraudlabspro_score Overall score between 1 and 100. 100 is the highest risk and 1 is the lowest risk.
fraudlabspro_status Final action based on the rules analysis.
Return values: APPROVE | REJECT | REVIEW
fraudlabspro_rules Return the rules triggered by the system.
Available on Mini plan onward only.

Sample Codes

<?php
require_once 'lib/FraudLabsPro.php';

// Configures FraudLabs Pro API key
FraudLabsPro\Configuration::apiKey('YOUR_API_KEY');

$result = FraudLabsPro\Order::getTransaction('20170906MXFHSTRF', FraudLabsPro::FLP_ID);
import com.fraudlabspro.*;
import java.util.Hashtable;

public class FLP {

    public static void main(String[] args) {
        // Configures FraudLabs Pro API key
        FraudLabsPro.APIKEY = "YOUR_API_KEY";

        // Get Order Result API
        Order orderResults = new Order();

        // Sets order ID to return all available information regarding the order
        Hashtable data = new Hashtable<>();
        data.put("id", "20180709-NHAEUK");
        data.put("id_type", orderResults.FLP_ID);

        String result = orderResults.getTransaction(data);  // Obtains order results from FraudLabs Pro
    }
}
Imports FraudLabsPro.FraudLabsPro
Imports Newtonsoft.Json

Module Program
    Sub Main()
        'Configure FraudLabs Pro API KEY
        FraudLabsProConfig.APIKey = "YOUR_API_KEY"

        Dim GetOrderPara As New OrderPara With {
            .ID = "20240112-1EILFK",
            .IDType = Order.IDTypes.FLP_ID
        }

        'Get Order Result API
        Dim OrderResult As New Order
        Dim result = OrderResult.GetOrderResult(GetOrderPara) 'Get order result from FraudLabs Pro

        Dim ipgeolocation = result("ip_geolocation")
        Dim ipgeolocationfields = New ArrayList From {
            "ip",
            "continent",
            "country_code",
            "country_name",
            "region",
            "city",
            "latitude",
            "longitude",
            "zip_code",
            "timezone",
            "isp_name",
            "domain",
            "netspeed",
            "mobile_mnc",
            "mobile_mcc",
            "mobile_brand",
            "elevation",
            "usage_type",
            "is_proxy",
            "is_in_blacklist"
        }

        For Each field In ipgeolocationfields
            Console.WriteLine("ip_geolocation." & field.ToString & ": " & ipgeolocation(field).ToString)
        Next

        Dim billingaddress = result("billing_address")
        Dim billingaddressfields = New ArrayList From {
            "ip_distance_in_km",
            "ip_distance_in_mile",
            "is_ip_country_match"
        }

        For Each field In billingaddressfields
            Console.WriteLine("billing_address." & field.ToString & ": " & billingaddress(field).ToString)
        Next

        Dim shippingaddress = result("shipping_address")
        Dim shippingaddressfields = New ArrayList From {
            "is_address_ship_forward",
            "is_bill_country_match",
            "is_bill_state_match",
            "is_bill_city_match",
            "is_bill_postcode_match",
            "is_export_controlled_country",
            "is_in_blacklist"
        }

        For Each field In shippingaddressfields
            Console.WriteLine("shipping_address." & field.ToString & ": " & shippingaddress(field).ToString)
        Next

        Dim emailaddress = result("email_address")
        Dim emailaddressfields = New ArrayList From {
            "is_free",
            "is_disposable",
            "is_domain_exist",
            "is_new_domain_name",
            "is_in_blacklist"
        }

        For Each field In emailaddressfields
            Console.WriteLine("email_address." & field.ToString & ": " & emailaddress(field).ToString)
        Next

        Dim phonenumber = result("phone_number")
        Dim phonenumberfields = New ArrayList From {
            "is_disposable",
            "is_in_blacklist"
        }

        For Each field In phonenumberfields
            Console.WriteLine("phone_number." & field.ToString & ": " & phonenumber(field).ToString)
        Next

        Dim username = result("username")
        Dim usernamefields = New ArrayList From {
            "is_high_risk",
            "is_in_blacklist"
        }

        For Each field In usernamefields
            Console.WriteLine("username." & field.ToString & ": " & username(field).ToString)
        Next

        Dim creditcard = result("credit_card")
        Dim creditcardfields = New ArrayList From {
            "card_brand",
            "card_type",
            "card_issuing_bank",
            "card_issuing_country",
            "is_prepaid",
            "is_bin_exist",
            "is_bin_country_match",
            "is_in_blacklist"
        }

        For Each field In creditcardfields
            Console.WriteLine("credit_card." & field.ToString & ": " & creditcard(field).ToString)
        Next

        Dim device = result("device")
        Dim devicefields = New ArrayList From {
            "is_malware_exploit",
            "is_in_blacklist"
        }

        For Each field In devicefields
            Console.WriteLine("device." & field.ToString & ": " & device(field).ToString)
        Next

        Console.WriteLine("user_order_id: " & result("user_order_id").ToString)
        Console.WriteLine("fraudlabspro_id: " & result("fraudlabspro_id").ToString)
        Console.WriteLine("fraudlabspro_score: " & result("fraudlabspro_score").ToString)
        Console.WriteLine("fraudlabspro_status: " & result("fraudlabspro_status").ToString)
        Console.WriteLine("fraudlabspro_rules: " & result("fraudlabspro_rules").ToString)
    End Sub
End Module
using FraudLabsPro.FraudLabsPro;
using System.Collections;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

// Configure FraudLabs Pro API KEY
FraudLabsProConfig.APIKey = "YOUR_API_KEY";

OrderPara GetOrderPara = new()
{
	ID = "20240112-1EILFK",
	IDType = Order.IDTypes.FLP_ID
};

//Get Order Result API
Order OrderResult = new();
JObject result = OrderResult.GetOrderResult(GetOrderPara); // Get order result from FraudLabs Pro

JToken ipgeolocation;
if (result.TryGetValue("ip_geolocation", out ipgeolocation))
{
	var ipgeolocationfields = new ArrayList()
		{
			"ip",
			"continent",
			"country_code",
			"country_name",
			"region",
			"city",
			"latitude",
			"longitude",
			"zip_code",
			"timezone",
			"isp_name",
			"domain",
			"netspeed",
			"mobile_mnc",
			"mobile_mcc",
			"mobile_brand",
			"elevation",
			"usage_type",
			"is_proxy",
			"is_in_blacklist"
		};

	foreach (var field in ipgeolocationfields)
		Console.WriteLine("ip_geolocation." + field + ": " + ipgeolocation[field]);
}

JToken billingaddress;
if (result.TryGetValue("billing_address", out billingaddress))
{
	var billingaddressfields = new ArrayList()
		{
			"ip_distance_in_km",
			"ip_distance_in_mile",
			"is_ip_country_match"
		};

	foreach (var field in billingaddressfields)
		Console.WriteLine("billing_address." + field + ": " + billingaddress[field]);
}

JToken shippingaddress;
if (result.TryGetValue("shipping_address", out shippingaddress))
{
	var shippingaddressfields = new ArrayList()
		{
			"is_address_ship_forward",
			"is_bill_country_match",
			"is_bill_state_match",
			"is_bill_city_match",
			"is_bill_postcode_match",
			"is_export_controlled_country",
			"is_in_blacklist"
		};

	foreach (var field in shippingaddressfields)
		Console.WriteLine("shipping_address." + field + ": " + shippingaddress[field]);
}

JToken emailaddress;
if (result.TryGetValue("email_address", out emailaddress))
{
	var emailaddressfields = new ArrayList()
		{
			"is_free",
			"is_disposable",
			"is_domain_exist",
			"is_new_domain_name",
			"is_in_blacklist"
		};

	foreach (var field in emailaddressfields)
		Console.WriteLine("email_address." + field + ": " + emailaddress[field]);
}

JToken phonenumber;
if (result.TryGetValue("phone_number", out phonenumber))
{
	var phonenumberfields = new ArrayList()
		{
			"is_disposable",
			"is_in_blacklist"
		};

	foreach (var field in phonenumberfields)
		Console.WriteLine("phone_number." + field + ": " + phonenumber[field]);
}

JToken username;
if (result.TryGetValue("username", out username))
{
	var usernamefields = new ArrayList()
		{
			"is_high_risk",
			"is_in_blacklist"
		};

	foreach (var field in usernamefields)
		Console.WriteLine("username." + field.ToString() + ": " + username[field]);
}

JToken creditcard;
if (result.TryGetValue("credit_card", out creditcard))
{
	var creditcardfields = new ArrayList()
		{
			"card_brand",
			"card_type",
			"card_issuing_bank",
			"card_issuing_country",
			"is_prepaid",
			"is_bin_exist",
			"is_bin_country_match",
			"is_in_blacklist"
		};

	foreach (var field in creditcardfields)
		Console.WriteLine("credit_card." + field + ": " + creditcard[field]);
}

JToken device;
if (result.TryGetValue("device", out device))
{
	var devicefields = new ArrayList()
		{
			"is_malware_exploit",
			"is_in_blacklist"
		};

	foreach (var field in devicefields)
		Console.WriteLine("device." + field + ": " + device[field]);
}

Console.WriteLine("user_order_id: " + result["user_order_id"]);
Console.WriteLine("fraudlabspro_id: " + result["fraudlabspro_id"]);
Console.WriteLine("fraudlabspro_score: " + result["fraudlabspro_score"]);
Console.WriteLine("fraudlabspro_status: " + result["fraudlabspro_status"]);
Console.WriteLine("fraudlabspro_rules: " + result["fraudlabspro_rules"]);
 # Import SDK to use the function
from libs.order import Order

 # Configure your API key
api_key = 'YOUR_API_KEY'

get_transaction_variables = {
	'key': api_key,
	'id': '20180705-WISXW2',
	'id_type': 'FraudLabsPro::FLP_ID'
}
print(Order.get_transaction(get_transaction_variables))
$ curl https://api.fraudlabspro.com/v2/order/result?key=Enter_License_Key&format=json&id=20130131-O263CR
require 'fraudlabspro_ruby'

FraudlabsproRuby::Configuration.api_key = 'YOUR_API_KEY'

result = FraudlabsproRuby::Api::Order.getTransaction(
  transaction_id: '20180713-ZNVPV4',
  id_type: FraudlabsproRuby::Api::Order::FLP_ID
)
const {FraudValidation} = require("fraudlabspro-nodejs");

var flp = new FraudValidation('YOUR API KEY');

params = {
	id: '20170906MXFHSTRF',
	id_type: 'fraudlabspro_id',
};
flp.getTransaction(params, (err, data) => {
	if (!err) {
		console.log(data);
	}
});