Screen Order API
Developer Guide
Screen Order
Screen an order transaction for payment fraud. This REST API will detect all possible fraud traits based on the input parameters supplied. The more input parameter supplied, the higher accuracy of fraud detection. Protect your online business by signing up for a FREE license.
SIGN UP NOW
Request
POST
https://api.fraudlabspro.com/v2/order/screen
| Parameter | Type | Description |
|---|---|---|
| ip | string | (required) IP address of online transaction. It supports both IPv4 and IPv6 address format. |
| key | string | (required) API license key. |
| format | string | (optional) Return the result in json or xml format. Default:json Valid values: json | xml |
| last_name | string | (optional) User's last name. |
| first_name | string | (optional) User's first name. |
| bill_to | string | (optional) Billing details such as company name. |
| bill_addr | string | (optional) Street address of billing address. |
| bill_city | string | (optional) City of billing address. |
| bill_state | string | (optional) State of billing address. It supports state codes, e.g. NY (New York), for state or province of United States or Canada. |
| bill_country | string | (optional) Country of billing address. It requires the input of ISO-3166 alpha-2 country code , e.g. US for United States. |
| bill_zip_code | string | (optional) Postal or ZIP code of billing address. |
| ship_last_name | string | (optional) Recipient last name. |
| ship_first_name | string | (optional) Recipient first name. |
| ship_addr | string | (optional) Street address of shipping address. |
| ship_city | string | (optional) City of shipping address. |
| ship_state | string | (optional) State of shipping address. It supports state codes, e.g. NY - New York, for state or province of United States or Canada. |
| ship_country | string | (optional) Country of shipping address. It requires the input of ISO-3166 alpha-2 country code , e.g. US for United States. |
| ship_zip_code | string | (optional) Postal or ZIP code of shipping address. |
| ship_method | string | (optional) Order shipping method. Supported values: standard_delivery | local_pickup |
| user_phone | string | (optional) User's phone number in international format. (For example, +11234567890) |
| string | (optional) User's email address. | |
| email_hash | string | (optional) SHA2 hash of user's email address. If you have provided the value in the email , then you do not need to supply this email_hash parameter. |
| email_domain | string | (optional) Domain name of email address. For example, the domain of email address support@fraudlabspro.com is fraudlabspro.com . If you didn't supply this value, the system will automatically extract the domain name from the email field. If you have provided the value in the email , then you do not need to supply this email_domain parameter. |
| username | string | (optional) The username used in the account sign up, if applicable |
| bin_no | string | (optional) First 6 or 8 digits of credit card number to identify issuing bank. |
| card_hash | string | (optional) SHA2 hash of credit number. |
| avs_result | string | (optional) The single character AVS result returned by the credit card processor. |
| cvv_result | string | (optional) The single character CVV2 result returned by the credit card processor. This is not for the input of the actual CVV code from the back of the credit card. |
| user_order_id | string | (optional) Merchant identifier to uniquely identify a transaction. It supports maximum of 15 characters user order id input. |
| amount | decimal | (optional) Amount of the transaction. |
| quantity | integer | (optional) Total quantity of the transaction. |
| currency | string | (optional) Currency code used in the transaction. It requires the input of ISO-4217 (3 characters) currency code, e.g. USD for US Dollar. |
| department | string | (optional) Merchant identifier to uniquely identify a product or service department. |
| items New | string | (optional) The items purchased in the transaction. This field accepts a JSON array of objects where each object contains sku, quantity, price and the optional fields type, name and purchase_type. Learn More » |
| payment_gateway | string | (optional) The name of payment gateway used to capture the payment. |
| payment_mode | string | (optional) Payment mode of transaction. Valid values: creditcard | paypal | cod | bankdeposit | giftcard | crypto | wired | others |
| coupon_code | string | (optional) Coupon code applied to the order transaction. |
| flp_checksum | string | (optional) Checksum for the device validation. Please visit Agent Javascript to learn about the use of this parameter. |
Response
| Parameter | Type | Description |
|---|---|---|
| ip_geolocation.ip | string | IP address of the transaction. |
| ip_geolocation.continent | string | Estimated continent of the IP address. |
| ip_geolocation.country_code | string | Estimated ISO-3166 alpha-2 country code of the IP address. |
| ip_geolocation.country_name | string | Estimated country of the IP address. |
| ip_geolocation.region | string | Estimated region of the IP address. |
| ip_geolocation.city | string | Estimated city of the IP address. |
| ip_geolocation.latitude | decimal | Estimated latitude of the IP address in 4 precisions. |
| ip_geolocation.longitude | decimal | Estimated longitude of the IP address in 4 precisions. |
| ip_geolocation.zip_code | string | Estimated ZIP code of the IP address. |
| ip_geolocation.timezone | string | Estimated timezone of the IP address. |
| ip_geolocation.isp_name | string | Estimated ISP name of the IP address. |
| ip_geolocation.domain | string | Estimated domain name of the IP address. |
| ip_geolocation.netspeed | string | Estimated netspeed of the IP address. |
| ip_geolocation.mobile_mnc | string | Estimated mobile mnc information of the IP address, if it is a mobile network. |
| ip_geolocation.mobile_mcc | string | Estimated mobile mcc information of the IP address, if it is a mobile network. |
| ip_geolocation.mobile_brand | string | Estimated mobile brand information of the IP address, if it is a mobile network. |
| ip_geolocation.elevation | integer | Estimated elevation of the IP address. |
| ip_geolocation.usage_type | string | 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 | boolean | Whether the IP address is from a known anonymous proxy server. |
| ip_geolocation.is_in_blacklist | boolean | Whether the IP address is in our blacklist database. |
| billing_address.ip_distance_in_km | integer | Distance of location between IP address and bill. Value in kilometer. |
| billing_address.ip_distance_in_mile | integer | Distance of location between IP address and bill. Value in mile. |
| billing_address.is_ip_country_match | boolean | Whether country of IP address matches billing address country. |
| shipping_address.is_address_ship_forward | boolean | Whether the shipping address is in database of known mail drops. |
| shipping_address.is_bill_city_match | boolean | Whether the billing city matches the shipping city. |
| shipping_address.is_bill_state_match | boolean | Whether the billing state matches the shipping state. |
| shipping_address.is_bill_country_match | boolean | Whether the billing country matches the shipping country. |
| shipping_address.is_bill_postcode_match | boolean | Whether the billing postal/zip code matches the shipping postal/zip code. |
| shipping_address.is_export_controlled_country | boolean | Whether the country is from an embargoed country. |
| shipping_address.is_in_blacklist | boolean | Whether the ship address is in our blacklist database. |
| email_address.is_free | boolean | Whether the email is from free email provider. |
| email_address.is_disposable | boolean | Whether the email is a disposable email. Only applicable for Small Plan onward. |
| email_address.is_domain_exist | boolean | Whether the email domain name is a valid domain. |
| email_address.is_new_domain_name | boolean | Whether the email domain name a newly registered name. Only applicable for non-free email domain. |
| email_address.is_in_blacklist | boolean | Whether the email address is in our blacklist database. |
| phone_number.is_disposable | boolean | Whether the phone number is a disposable phone number. Only applicable for Medium Plan onward. |
| phone_number.is_in_blacklist | boolean | Whether the user's phone number is in our blacklist database. |
| username.is_high_risk | boolean | Whether the username is in our high risk database. |
| username.is_in_blacklist | boolean | Whether the username is in our blacklist database. |
| credit_card.card_brand | string | The brand of the card. Available on Medium plan onward only. |
| credit_card.card_type | string | Whether the card is a type of credit or debit. Available on Medium plan onward only. |
| credit_card.card_subtype | string | The subtype of the card. Available on Medium plan onward only. |
| credit_card.card_issuing_bank | string | The name of the bank where the card being issued. Available on Medium plan onward only. |
| credit_card.card_issuing_country | string | The ISO-3166 alpha-2 Country Codes where the card being issued. Available on Medium plan onward only. |
| credit_card.is_prepaid | boolean | Whether the credit card is a type of prepaid card. |
| credit_card.is_bin_exist | boolean | Whether the BIN information matches our BIN list. |
| credit_card.is_bin_country_match | boolean | Whether the country of issuing bank matches BIN country code. |
| credit_card.is_in_blacklist | boolean | Whether the credit card is in our blacklist database. |
| device.is_malware_exploit | boolean | Whether the machine is infected. |
| device.is_in_blacklist | boolean | Whether the device Id is in our blacklist database. |
| user_order_id | string | Return the order identifier given by merchant earlier. |
| fraudlabspro_id | string | System own unique identifier to identify this API transaction. |
| fraudlabspro_score | integer | Overall score between 1 and 100. 100 is the highest risk and 1 is the lowest risk. |
| fraudlabspro_status | string | Final action based on the rules analysis. Return values: APPROVE | REJECT | REVIEW |
| fraudlabspro_rules | array | Return the rules triggered by the system. Available on Mini plan onward only. |
| api_version | string | Version of the fraud analysis engine used in this transaction. |
| remaining_credits | integer | Balance of queries in your account after this transaction. |
SDK
You may use our official SDK to assist you in code implementation
PHP SDK
Java SDK
Python SDK
Ruby SDK
.NET SDK
Node.js SDK
Rust SDK
Go SDK
Kotlin SDK
Scala SDK
Sample Codes
Sample Code
<?php
require_once
'lib/FraudLabsPro.php'
;
// Configures FraudLabs Pro API key
FraudLabsPro
\
Configuration
::
apiKey
(
'YOUR_API_KEY'
)
;
// Order details
$orderDetails
=
[
'ip'
=>
'146.112.62.105'
,
'order'
=>
[
'orderId'
=>
'67398'
,
'note'
=>
'Online shop'
,
'currency'
=>
'USD'
,
'amount'
=>
'79.89'
,
'quantity'
=>
1
,
// Please refer reference section for full list of payment methods
'paymentGateway'
=>
'stripe'
,
'paymentMethod'
=>
FraudLabsPro
\
Order
::
CREDIT_CARD
,
]
,
'billing'
=>
[
'firstName'
=>
'Hector'
,
'lastName'
=>
'Henderson'
,
'email'
=>
,
'phone'
=>
'+15616288674'
,
'address'
=>
'1766 Powder House Road'
,
'city'
=>
'West Palm Beach'
,
'state'
=>
'FL'
,
'postcode'
=>
'33401'
,
'country'
=>
'US'
,
]
,
'shipping'
=>
[
'firstName'
=>
'Hector'
,
'lastName'
=>
'Henderson'
,
'address'
=>
'4469 Chestnut Street'
,
'city'
=>
'Tampa'
,
'state'
=>
'FL'
,
'postcode'
=>
'33602'
,
'country'
=>
'US'
,
]
,
]
;
// Sends the order details to FraudLabs Pro
$result
=
FraudLabsPro
\
Order
::
validate
(
$orderDetails
)
;
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"
;
// Screen Order API
Order
order
=
new
Order
(
)
;
// Sets order details
Hashtable
data
=
new
Hashtable
<
>
(
)
;
data
.
put
(
"ip"
,
"146.112.62.105"
)
;
// IP parameter is mandatory
data
.
put
(
"first_name"
,
"Hector"
)
;
data
.
put
(
"last_name"
,
"Henderson"
)
;
data
.
put
(
"email"
,
)
;
data
.
put
(
"user_phone"
,
"+15616288674"
)
;
// Billing information
data
.
put
(
"bill_addr"
,
"1766 PowderHouse Road"
)
;
data
.
put
(
"bill_city"
,
"West Palm Beach"
)
;
data
.
put
(
"bill_state"
,
"FL"
)
;
data
.
put
(
"bill_country"
,
"US"
)
;
data
.
put
(
"bill_zip_code"
,
"33401"
)
;
// Order information
data
.
put
(
"user_order_id"
,
"67398"
)
;
data
.
put
(
"amount"
,
"79.89"
)
;
data
.
put
(
"quantity"
,
"1"
)
;
data
.
put
(
"currency"
,
"USD"
)
;
data
.
put
(
"payment_gateway"
,
"stripe"
)
;
data
.
put
(
"payment_mode"
,
order
.
CREDIT_CARD
)
;
// Please refer reference section for full list of payment methods
// Shipping information
data
.
put
(
"ship_first_name"
,
"Hector"
)
;
data
.
put
(
"ship_last_name"
,
"Henderson"
)
;
data
.
put
(
"ship_addr"
,
"4469 Chestnut Street"
)
;
data
.
put
(
"ship_city"
,
"Tampa"
)
;
data
.
put
(
"ship_state"
,
"FL"
)
;
data
.
put
(
"ship_zip_code"
,
"33602"
)
;
data
.
put
(
"ship_country"
,
"US"
)
;
String
result
=
order
.
validate
(
data
)
;
// Sends order details to FraudLabs Pro
}
}
Imports
FraudLabsPro
.
FraudLabsPro
Imports
Newtonsoft
.
Json
Module
Program
Sub
Main
(
)
'Configure FraudLabs Pro API KEY
FraudLabsProConfig
.
APIKey
=
"YOUR_API_KEY"
Dim
ScreenOrderPara
As
New
OrderPara
With
{
.
IPAddress
=
"146.112.62.105"
,
' IP Parameter is mandatory
.
FirstName
=
"Hector"
,
.
LastName
=
"Henderson"
,
.
EmailAddress
=
,
.
BillAddress
=
"1766 PowderHouse Road"
,
.
BillCity
=
"West Palm Beach"
,
.
BillState
=
"FL"
,
.
BillCountry
=
"US"
,
.
BillZIPCode
=
"33401"
,
.
UserPhone
=
"+15616288674"
,
.
UserOrderID
=
"67398"
,
.
Amount
=
"79.89"
,
.
Quantity
=
"1"
,
.
Currency
=
"USD"
,
.
PaymentGateway
=
"stripe"
,
.
PaymentMode
=
Order
.
PaymentMethods
.
CREDIT_CARD
,
.
ShippingFirstName
=
"Hector"
,
.
ShippingLastName
=
"Henderson"
,
.
ShippingAddress
=
"4469 Chestnut Street"
,
.
ShippingCity
=
"Tampa"
,
.
ShippingState
=
"FL"
,
.
ShippingZIPCode
=
"33602"
,
.
ShippingCountry
=
"US"
}
'ScreenOrder API
Dim
ScreenOrder
As
New
Order
Dim
result
=
ScreenOrder
.
ScreenOrder
(
ScreenOrderPara
)
' Send order to 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
)
Console
.
WriteLine
(
"api_version: "
&
result
(
"api_version"
)
.
ToString
)
Console
.
WriteLine
(
"remaining_credits: "
&
result
(
"remaining_credits"
)
.
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
ScreenOrderPara
=
new
(
)
{
IPAddress
=
"146.112.62.105"
,
FirstName
=
"Hector"
,
LastName
=
"Henderson"
,
EmailAddress
=
,
BillAddress
=
"1766 PowderHouse Road"
,
BillCity
=
"West Palm Beach"
,
BillState
=
"FL"
,
BillCountry
=
"US"
,
BillZIPCode
=
"33401"
,
UserPhone
=
"+15616288674"
,
UserOrderID
=
"67398"
,
Amount
=
decimal
.
Parse
(
"79.89"
)
,
Quantity
=
1
,
Currency
=
"USD"
,
PaymentGateway
=
"stripe"
,
PaymentMode
=
Order
.
PaymentMethods
.
CREDIT_CARD
,
ShippingFirstName
=
"Hector"
,
ShippingLastName
=
"Henderson"
,
ShippingAddress
=
"4469 Chestnut Street"
,
ShippingCity
=
"Tampa"
,
ShippingState
=
"FL"
,
ShippingZIPCode
=
"33602"
,
ShippingCountry
=
"US"
}
;
// ScreenOrder API
Order
ScreenOrder
=
new
(
)
;
JObject
result
=
ScreenOrder
.
ScreenOrder
(
ScreenOrderPara
)
;
// Send order to 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"
]
)
;
Console
.
WriteLine
(
"api_version: "
+
result
[
"api_version"
]
)
;
Console
.
WriteLine
(
"remaining_credits: "
+
result
[
"remaining_credits"
]
)
;
# Import SDK to use the function
from
libs
.
order
import
Order
# Configure your API key
api_key
=
'YOUR_API_KEY'
order_details_variables
=
{
'key'
:
api_key
,
'ip'
:
'146.112.62.105'
,
'order'
:
{
'order_id'
:
'67398'
,
'currency'
:
'USD'
,
'amount'
:
'42'
,
'quantity'
:
1
,
'paymentGateway'
:
'stripe'
,
'paymentMethod'
:
'creditcard'
}
,
'billing'
:
{
'firstName'
:
'Hector'
,
'lastName'
:
'Henderson'
,
'email'
:
,
'phone'
:
'+15616288674'
,
'address'
:
'1766 Powder House Road'
,
'city'
:
'West Palm Beach'
,
'state'
:
'FL'
,
'postcode'
:
'33401'
,
'country'
:
'US'
,
}
,
'shipping'
:
{
'firstName'
:
'Hector'
,
'lastName'
:
'Henderson'
,
'address'
:
'4469 Chestnut Street'
,
'city'
:
'Tampa'
,
'state'
:
'FL'
,
'postcode'
:
'33602'
,
'country'
:
'US'
,
}
}
(
Order
.
validate
(
order_details_variables
)
)
curl
https://api.fraudlabspro.com/v2/order/screen
\
--header
'Content-Type: application/json'
\
--data
'{ "key": "Enter_License_Key", "format": "json", "ip": "IP_Address", "last_name": "Henderson", "first_name": "Hector", "bill_addr": "1766 PowderHouse Road", "bill_city": "Cleveland", "bill_state": "OH", "bill_zip_code": "44115", "bill_country": "US", "ship_last_name": "Henderson", "ship_first_name": "Hector", "ship_addr": "4987 Bingamon Road", "ship_city": "Cleveland", "ship_state": "OH", "ship_zip_code": "44115", "ship_country": "US", "email_domain": "gmail.com", "user_phone": "440-5551961", "email_hash": "Email_Hash", "bin_no": "558265", "card_hash": "Card_Hash", "avs_result": "Y", "cvv_result": "M", "user_order_id": "7893", "amount": "99.95", "quantity": "1", "department": "Online Store", "payment_gateway": "stripe", "payment_mode": "creditcard" }'
require
'fraudlabspro_ruby'
FraudlabsproRuby
::
Configuration
.
api_key
=
'YOUR_API_KEY'
result
=
FraudlabsproRuby
::
Api
::
Order
.
validate
(
ip
:
'146.112.62.105'
,
first_name
:
'Hector'
,
last_name
:
'Henderson'
,
:
,
phone
:
'+15616288674'
,
# Billing information
bill_addr
:
'1766 PowderHouse Road'
,
bill_city
:
'West Palm Beach'
,
bill_state
:
'FL'
,
bill_zip_code
:
'33401'
,
bill_country
:
'US'
,
# Order information
user_order_id
:
'67398'
,
amount
:
'79.89'
,
quantity
:
'1'
,
currency
:
'USD'
,
payment_gateway
:
'stripe'
,
payment_mode
:
FraudlabsproRuby
::
Api
::
Order
::
CREDIT_CARD
,
# Shipping information
ship_first_name
:
'Hector'
,
ship_last_name
:
'Henderson'
,
ship_addr
:
'4469 Chestnut Street'
,
ship_city
:
'Tampa'
,
ship_state
:
'FL'
,
ship_zip_code
:
'33602'
,
ship_country
:
'US'
)
const
{
FraudValidation
}
=
require
(
"fraudlabspro-nodejs"
)
;
var
flp
=
new
FraudValidation
(
'YOUR API KEY'
)
;
params
=
{
ip
:
'146.112.62.105'
,
user_order_id
:
'67398'
,
currency
:
'USD'
,
amount
:
'79.89'
,
quantity
:
1
,
payment_gateway
:
'stripe'
,
payment_mode
:
'creditcard'
,
first_name
:
'Hector'
,
last_name
:
'Henderson'
,
:
,
user_phone
:
'+15616288674'
,
bill_addr
:
'1766 Powder House Road'
,
bill_city
:
'West Palm Beach'
,
bill_state
:
'FL'
,
bill_zip_code
:
'33401'
,
bill_country
:
'US'
,
ship_first_name
:
'Hector'
,
ship_last_name
:
'Henderson'
,
ship_addr
:
'4469 Chestnut Street'
,
ship_city
:
'Tampa'
,
ship_state
:
'FL'
,
ship_zip_code
:
'33602'
,
ship_country
:
'US'
,
}
;
flp
.
validate
(
params
,
(
err
,
data
)
=>
{
if
(
!
err
)
{
console
.
log
(
data
)
;
}
}
)
;
use
fraudlabspro
::
validation
::
{
FraudValidation
,
FraudValidationRequest
,
OrderInfo
,
CardInfo
,
BillingInfo
,
ShippingInfo
}
;
fn
main
(
)
->
Result
<
(
)
,
Box
<
dyn
std
::
error
::
Error
>>
{
let
fv
=
FraudValidation
::
new
(
"YOUR_API_KEY"
)
;
let
req
=
FraudValidationRequest
{
ip
:
Some
(
"146.112.62.105"
.
to_string
(
)
)
,
flp_checksum
:
None
,
order
:
Some
(
OrderInfo
{
order_id
:
Some
(
"67398"
.
into
(
)
)
,
order_note
:
None
,
currency
:
Some
(
"USD"
.
into
(
)
)
,
amount
:
Some
(
"42"
.
into
(
)
)
,
quantity
:
Some
(
"1"
.
into
(
)
)
,
payment_gateway
:
Some
(
"stripe"
.
into
(
)
)
,
payment_method
:
Some
(
"creditcard"
.
into
(
)
)
,
department
:
None
,
}
)
,
card
:
Some
(
CardInfo
{
avs_result
:
None
,
cvv_result
:
None
,
}
)
,
billing
:
Some
(
BillingInfo
{
first_name
:
Some
(
"John"
.
into
(
)
)
,
last_name
:
Some
(
"Doe"
.
into
(
)
)
,
username
:
Some
(
"jdoe"
.
into
(
)
)
,
password
:
Some
(
"s3cr3t"
.
into
(
)
)
,
:
Some
(
.
into
(
)
)
,
phone
:
Some
(
"555-123-4567"
.
into
(
)
)
,
address
:
Some
(
"1 Main St"
.
into
(
)
)
,
city
:
Some
(
"NYC"
.
into
(
)
)
,
state
:
Some
(
"NY"
.
into
(
)
)
,
postcode
:
Some
(
"10001"
.
into
(
)
)
,
country
:
Some
(
"US"
.
into
(
)
)
,
}
)
,
shipping
:
Some
(
ShippingInfo
{
first_name
:
Some
(
"John"
.
into
(
)
)
,
last_name
:
Some
(
"Doe"
.
into
(
)
)
,
address
:
Some
(
"1 Main St"
.
into
(
)
)
,
city
:
Some
(
"NYC"
.
into
(
)
)
,
state
:
Some
(
"NY"
.
into
(
)
)
,
postcode
:
Some
(
"10001"
.
into
(
)
)
,
country
:
Some
(
"US"
.
into
(
)
)
,
}
)
,
}
;
let
res
=
fv
.
validate
(
req
)
?
;
// JSON text
println!
(
"{}"
,
res
)
;
Ok
(
(
)
)
}
package
main
import
(
"github.com/fraudlabspro/fraudlabspro-go/fraudlabspro"
"fmt"
)
func
main
(
)
{
apikey
:=
"YOUR_API_KEY"
config
,
err
:=
fraudlabspro
.
OpenConfiguration
(
apikey
)
if
err
!=
nil
{
fmt
.
(
err
)
return
}
flp
,
err
:=
fraudlabspro
.
OpenOrder
(
config
)
if
err
!=
nil
{
fmt
.
(
err
)
return
}
params
:=
make
(
map
[
string
]
string
)
params
[
"ip"
]
=
"146.112.62.105"
params
[
"user_order_id"
]
=
"67398"
params
[
"currency"
]
=
"USD"
params
[
"amount"
]
=
"79.89"
params
[
"quantity"
]
=
"1"
params
[
"payment_gateway"
]
=
"stripe"
params
[
"payment_mode"
]
=
fraudlabspro
.
PaymentMethodCreditCard params
[
"first_name"
]
=
"Hector"
params
[
"last_name"
]
=
"Henderson"
params
[
"email"
]
=
params
[
"user_phone"
]
=
"+15616288674"
params
[
"bill_addr"
]
=
"1766 Powder House Road"
params
[
"bill_city"
]
=
"West Palm Beach"
params
[
"bill_state"
]
=
"FL"
params
[
"bill_zip_code"
]
=
"33401"
params
[
"bill_country"
]
=
"US"
params
[
"ship_first_name"
]
=
"Hector"
params
[
"ship_last_name"
]
=
"Henderson"
params
[
"ship_addr"
]
=
"4469 Chestnut Street"
params
[
"ship_city"
]
=
"Tampa"
params
[
"ship_state"
]
=
"FL"
params
[
"ship_zip_code"
]
=
"33602"
params
[
"ship_country"
]
=
"US"
res
,
err
:=
flp
.
Validate
(
params
)
fmt
.
Printf
(
"%+v\n"
,
res
)
}
object
TestValidate
{
@JvmStatic
fun
main
(
args
:
Array
<
String
>
)
{
// Configures FraudLabs Pro API key
FraudLabsPro
.
APIKEY
=
"YOUR_API_KEY"
// Screen Order API
val
order
=
Order
(
)
// Sets order details
val
data
=
java
.
util
.
Hashtable
<
String
?
,
String
?
>
(
)
data
[
"ip"
]
=
"146.112.62.105"
// IP parameter is mandatory
data
[
"first_name"
]
=
"Hector"
data
[
"last_name"
]
=
"Henderson"
data
[
"email"
]
=
data
[
"user_phone"
]
=
"+15616288674"
// Billing information
data
[
"bill_addr"
]
=
"1766 PowderHouse Road"
data
[
"bill_city"
]
=
"West Palm Beach"
data
[
"bill_state"
]
=
"FL"
data
[
"bill_country"
]
=
"US"
data
[
"bill_zip_code"
]
=
"33401"
// Order information
data
[
"user_order_id"
]
=
"67398"
data
[
"amount"
]
=
"79.89"
data
[
"quantity"
]
=
"1"
data
[
"currency"
]
=
"USD"
data
[
"payment_gateway"
]
=
"stripe"
data
[
"payment_mode"
]
=
order
.
CREDIT_CARD
// Please refer reference section for full list of payment methods
// Shipping information
data
[
"ship_first_name"
]
=
"Hector"
data
[
"ship_last_name"
]
=
"Henderson"
data
[
"ship_addr"
]
=
"4469 Chestnut Street"
data
[
"ship_city"
]
=
"Tampa"
data
[
"ship_state"
]
=
"FL"
data
[
"ship_zip_code"
]
=
"33602"
data
[
"ship_country"
]
=
"US"
val
result
=
order
.
validate
(
data
)
// Sends order details to FraudLabs Pro
(
result
)
}
}
import
com
.
fraudlabspro
.
_
import
java
.
util
object
TestValidate
{
def
main
(
args
:
Array
[
String
]
)
:
Unit
=
{
// Configures FraudLabs Pro API key
FraudLabsPro
.
APIKEY
=
"YOUR_API_KEY"
// Screen Order API
val
order
=
new
Order
// Sets order details
val
data
=
new
util
.
Hashtable
[
String
,
String
]
data
.
put
(
"ip"
,
"146.112.62.105"
)
// IP parameter is mandatory
data
.
put
(
"first_name"
,
"Hector"
)
data
.
put
(
"last_name"
,
"Henderson"
)
data
.
put
(
"email"
,
)
data
.
put
(
"user_phone"
,
"+15616288674"
)
// Billing information
data
.
put
(
"bill_addr"
,
"1766 PowderHouse Road"
)
data
.
put
(
"bill_city"
,
"West Palm Beach"
)
data
.
put
(
"bill_state"
,
"FL"
)
data
.
put
(
"bill_country"
,
"US"
)
data
.
put
(
"bill_zip_code"
,
"33401"
)
// Order information
data
.
put
(
"user_order_id"
,
"67398"
)
data
.
put
(
"amount"
,
"79.89"
)
data
.
put
(
"quantity"
,
"1"
)
data
.
put
(
"currency"
,
"USD"
)
data
.
put
(
"payment_gateway"
,
"stripe"
)
data
.
put
(
"payment_mode"
,
order
.
CREDIT_CARD
)
// Please refer reference section for full list of payment methods
// Shipping information
data
.
put
(
"ship_first_name"
,
"Hector"
)
data
.
put
(
"ship_last_name"
,
"Henderson"
)
data
.
put
(
"ship_addr"
,
"4469 Chestnut Street"
)
data
.
put
(
"ship_city"
,
"Tampa"
)
data
.
put
(
"ship_state"
,
"FL"
)
data
.
put
(
"ship_zip_code"
,
"33602"
)
data
.
put
(
"ship_country"
,
"US"
)
val
result
=
order
.
validate
(
data
)
// Sends order details to FraudLabs Pro
println
(
result
)
}
}