title: Fraud Buster API Quick Start Guide description: This section provides an overview of the Quick Start Guide for integrating Hive Forensics AI's Fraud Buster API.
Overview
Welcome to the Fraud Buster API
section. This guide provides all the information you need to integrate Hive Forensics AI’s Fraud Buster API, which helps detect and prevent online transaction fraud.
Content
- Introduction: Overview of the Fraud Buster API.
- API Setup: Step-by-step guide to configure your API environment.
- API Usage: Examples of how to use the Fraud Buster API.
- Response Handling: How to interpret API responses.
- FAQ: Frequently Asked Questions.
Getting Started
Step 1: Introduction
Fraud Buster API is designed to evaluate the risk of online transactions and help prevent fraudulent activities. It takes transaction details and returns a risk score based on various fraud indicators.
Step 2: API Setup
Follow these steps to set up your environment:
-
Install Required Tools:
- Node.js for JavaScript development
- Python for Python-based development
- A code editor (like VSCode)
-
Obtain Your API Key: Get your API key from the Hive Forensics AI portal. You’ll need this key to authenticate your API requests.
-
Create a Configuration File: Set up a configuration file in your project to store your API key and other necessary parameters securely. For example, in a Node.js project, you might use a
.env
file:API_KEY=your-api-key-here
Step 3: Configuration
-
Integrate the API Key: Add your API key to your project’s environment configuration. For example, in Node.js:
const apiKey = process.env.API_KEY;
-
Set Up Base URL: Define the base URL for the Fraud Buster API in your application’s configuration. Example:
const fraudBusterApiUrl = 'http://localhost:3000/api/transaction';
Step 4: API Usage
Fraud Buster API
Endpoint: POST http://localhost:3000/api/transaction
Headers:
{
"Content-Type": "application/json",
"x-api-key": "YOUR_API_KEY"
}
Request Payload:
{
"email": "sam@aol.com",
"product": "Laptop",
"amount": 1200,
"location": "Miami",
"time": "2024-03-04T10:30:00Z",
"customerProfile": "Tech Enthusiast",
"onlinePurchase": true,
"paymentMethod": "MasterCard",
"shippingAddress": "PO BOX 09900 Miami Floirda 33157",
"billingAddress": "PO BOX 21225 San Diego California 90211",
"customerEmail": "janedoe@gmail.com",
"customerName": "Jane Doe",
"isVPN": false,
"clientBrowser": "Chrome",
"deviceType": "Desktop",
"ipAddress": "192.168.1.1",
"deviceFingerprint": "abcd1234efgh5678",
"transactionFrequency": 2,
"accountAge": 365,
"emailDomain": "gmail.com",
"addressMismatch": true,
"twoFactorAuth": false,
"referralSource": "Google Search",
"proxyOrVPN": false,
"orderQuantity": 1
}
Example in Python
import requests
url = 'http://localhost:3000/api/transaction'
headers = {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY'
}
transaction_data = {
"email": "sam@aol.com",
"product": "Laptop",
"amount": 1200,
"location": "Miami",
"time": "2024-03-04T10:30:00Z",
"customerProfile": "Tech Enthusiast",
"onlinePurchase": True,
"paymentMethod": "MasterCard",
"shippingAddress": "PO BOX 09900 Miami Floirda 33157",
"billingAddress": "PO BOX 21225 San Diego California 90211",
"customerEmail": "janedoe@gmail.com",
"customerName": "Jane Doe",
"isVPN": False,
"clientBrowser": "Chrome",
"deviceType": "Desktop",
"ipAddress": "192.168.1.1",
"deviceFingerprint": "abcd1234efgh5678",
"transactionFrequency": 2,
"accountAge": 365,
"emailDomain": "gmail.com",
"addressMismatch": True,
"twoFactorAuth": False,
"referralSource": "Google Search",
"proxyOrVPN": False,
"orderQuantity": 1
}
response = requests.post(url, headers=headers, json=transaction_data)
print("Response:", response.json())
Example in JavaScript
const apiUrl = 'http://localhost:3000/api/transaction';
const apiKey = process.env.API_KEY;
const transactionData = {
email: "sam@aol.com",
product: "Laptop",
amount: 1200,
location: "Miami",
time: "2024-03-04T10:30:00Z",
customerProfile: "Tech Enthusiast",
onlinePurchase: true,
paymentMethod: "MasterCard",
shippingAddress: "PO BOX 09900 Miami Floirda 33157",
billingAddress: "PO BOX 21225 San Diego California 90211",
customerEmail: "janedoe@gmail.com",
customerName: "Jane Doe",
isVPN: false,
clientBrowser: "Chrome",
deviceType: "Desktop",
ipAddress: "192.168.1.1",
deviceFingerprint: "abcd1234efgh5678",
transactionFrequency: 2,
accountAge: 365,
emailDomain: "gmail.com",
addressMismatch: true,
twoFactorAuth: false,
referralSource: "Google Search",
proxyOrVPN: false,
orderQuantity: 1
};
fetch(apiUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': apiKey
},
body: JSON.stringify(transactionData)
})
.then(response => response.json())
.then(data => {
console.log('Response:', data);
})
.catch(error => {
console.error('Error:', error);
});
FAQ
For more detailed information, please visit our FAQ section.