Developer Guide

Feedback Order

Update status of a transaction from pending-manual-review to APPROVE, REJECT or IGNORE. The FraudLabs Pro algorithm will improve the formula in determine the FraudLabs Pro score using the data collected.

GET https://api.fraudlabspro.com/v1/order/feedback

Request
Parameter Description
id (required) Unique transaction Id generated by Fraud Check API.
key (required) API license key.
format (optional) Return the result in json or xml format. Default:xml
Valid values: json | xml
action (required) Perform APPROVE, REJECT, or REJECT_BLACKLIST action to transaction.
  • APPORVE: Approve a transaction
  • REJECT: Reject a transaction
  • REJECT_BLACKLIST: Reject and blacklist the transaction
When a transaction was blacklisted, the information will be recorded into the system for future blacklist validation check.
notes (optional) Notes for the feedback request.
Response
Parameter Description
fraudlabspro_error Error code in this transaction. Please refer toError Codes for complete list.
fraudlabspro_message More information about the status of this transaction. Please refer to Error Codes for complete list.
Sample Code
<?php
$apiKey = 'Enter_License_Key';
$params['format']   = 'json';
$params['id']       = '20130131-O263CR';
$params['action']   = 'APPROVE';

$query = '';

foreach($params as $key=>$value){
	$query .= '&' . $key . '=' . rawurlencode($value);
}

////////////
//For https request, please make sure you have enabled php_openssl.dll extension.
//
//How to enable https
//- Uncomment ;extension=php_openssl.dll by removing the semicolon in your php.ini, and restart the apache.
//
//In case you have difficulty to modify the php.ini, you can always make the http request instead of https.
////////////
$result = file_get_contents('https://api.fraudlabspro.com/v1/order/feedback?key=' . $apiKey . $query);

$data = json_decode($result);

print_r($data);
?>
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;

public class FLP {
	public static void main(String[] args) {
		try {

		URL url = new URL("https://api.fraudlabspro.com/v1/order/feedback?key=Enter_License_Key&format=json&id=20130131-O263CR&action=APPROVE");
		HttpURLConnection conn = (HttpURLConnection) url.openConnection();
		conn.setRequestMethod("GET");
		conn.setRequestProperty("Accept", "application/json");

		if (conn.getResponseCode() != 200) {
			throw new RuntimeException("Failed : HTTP error code : " + conn.getResponseCode());
		}

		BufferedReader br = new BufferedReader(new InputStreamReader(
			(conn.getInputStream())));

		String output;

		while ((output = br.readLine()) != null) {
			System.out.println(output);
		}

		conn.disconnect();

	  } catch (MalformedURLException e) {

		e.printStackTrace();

	  } catch (IOException e) {
		e.printStackTrace();
	  }
	}
}
Imports System.Net
Imports System.Security.Cryptography

Partial Public Class _Default
	Inherits System.Web.UI.Page

	Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
		Dim request As HttpWebRequest = Nothing
		Dim response As Net.HttpWebResponse = Nothing
		Dim stream As IO.Stream = Nothing

		Dim apiKey As String = "Enter_License_Key"
		Dim format As String = "json"
		Dim id As String = "20130131-O263CR"
		Dim action As String = "APPROVE"

		request = Net.WebRequest.Create("https://api.fraudlabspro.com/v1/order/feedback?key=" & apiKey & _
		"&format=" & System.Web.HttpUtility.UrlEncode(format) & _
		"&id=" & System.Web.HttpUtility.UrlEncode(id) & _
		"&action=" & System.Web.HttpUtility.UrlEncode(action))

		request.Method = "GET"
		response = request.GetResponse()

		Dim reader As System.IO.StreamReader = New IO.StreamReader(response.GetResponseStream())

		Page.Response.Write(reader.ReadToEnd)
	End Sub
End Class
										
using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Net;
using System.Security.Cryptography;

public partial class _Default : System.Web.UI.Page
{

	protected void Page_Load(object sender, System.EventArgs e)
	{
		HttpWebRequest request = null;
		System.Net.HttpWebResponse response = null;
		System.IO.Stream stream = null;

		string apiKey = "";
		string format = "json";
		string id = "20130131-O263CR";
		string action = "APPROVE";

		request = System.Net.WebRequest.Create("https://api.fraudlabspro.com/v1/order/feedback?key=" + apiKey + "&format=" + System.Web.HttpUtility.UrlEncode(format) + "&id=" + System.Web.HttpUtility.UrlEncode(id) + "&action=" + System.Web.HttpUtility.UrlEncode(action));

		request.Method = "GET";
		response = request.GetResponse();

		System.IO.StreamReader reader = new System.IO.StreamReader(response.GetResponseStream());

		Page.Response.Write(reader.ReadToEnd());
	}
}
import httplib
import urllib

p = { 'key': 'Enter_License_Key', 'format': 'json', 'id': '20130131-O263CR', 'action': 'APPROVE' }

conn = httplib.HTTPConnection("api.fraudlabspro.com")
conn.request("GET", "/v1/order/feedback?" + urllib.urlencode(p))
res = conn.getresponse()
print res.read()