Getting started overview
Integrating SEON for fraud prevention begins with a structured process to ensure proper access and functionality. This guide outlines the essential steps from account creation to executing your first API request. SEON provides tools for real-time fraud detection, leveraging data points such as email, phone, and IP analysis, alongside device fingerprinting, to assess risk and prevent fraudulent transactions SEON documentation overview. Understanding the initial setup is crucial for developers looking to incorporate these capabilities into their existing systems or new applications.
The core of SEON's offering is its Fraud API, which allows programmatic access to its fraud detection engine. This API can be used to send various data points related to a user or transaction, receiving a risk score and associated details in response. The process typically involves:
- Signing up for a SEON account, often starting with a trial.
- Locating and securing your API credentials (API key and Merchant ID).
- Making an initial API call to test connectivity and data exchange.
SEON offers SDKs for common platforms like JavaScript, Android, and iOS, simplifying integration for web and mobile applications SEON SDKs and integration guides. For backend integrations, direct API calls using popular languages such as Python, PHP, Node.js, Ruby, Java, and Go are supported, with examples often provided in the official documentation.
Create an account and get keys
To begin using SEON, the first step is to create an account. SEON offers a 14-day free trial, which provides access to the platform's features for evaluation SEON pricing and free trial details. During the signup process, you will typically provide basic company information and contact details. Once your account is activated, you will gain access to the SEON Admin Panel, which serves as your central hub for configuration, analytics, and API credential management.
Account Creation Steps:
- Navigate to the SEON website and locate the 'Start Free Trial' or 'Sign Up' option.
- Complete the registration form, providing the requested business and contact information.
- Verify your email address, if prompted, to activate your account.
- Log in to the SEON Admin Panel using your newly created credentials.
Obtaining API Credentials:
Within the SEON Admin Panel, your API keys are essential for authenticating requests to the Fraud API. SEON typically uses a combination of a Merchant ID and an API Key for authentication.
- Once logged into the Admin Panel, navigate to the 'Settings' or 'API Keys' section. The exact path may vary slightly based on UI updates, but it is usually clearly labeled.
- Locate your unique Merchant ID. This identifier links your API requests to your specific SEON account.
- Generate or retrieve your API Key. This key acts as a secret token that authenticates your application when making API calls. It's crucial to treat your API key as sensitive information and store it securely, avoiding exposure in public repositories or client-side code without appropriate proxying.
- SEON's documentation provides specific instructions on managing API keys, including options for regeneration if a key is compromised SEON API key management guidance.
The API key is typically included in the HTTP headers of your requests, often as an X-API-KEY header, or sometimes as part of the request body, depending on the specific endpoint and authentication method. Always refer to the SEON API Reference for authentication specifics for the most accurate implementation details.
Your first request
After obtaining your API credentials, the next step is to make a test request to verify your setup. A common first request is to send an email address for analysis, which is a fundamental component of SEON's fraud detection capabilities. This initial call confirms that your authentication is correct and that you can successfully communicate with the SEON API.
Example: Email API Request (Python)
This example demonstrates how to send an email address for analysis using Python's requests library. Replace YOUR_MERCHANT_ID and YOUR_API_KEY with your actual credentials.
import requests
import json
MERCHANT_ID = "YOUR_MERCHANT_ID"
API_KEY = "YOUR_API_KEY"
# The endpoint for email analysis
EMAIL_API_URL = f"https://api.seon.io/v2.1/email-api/{MERCHANT_ID}"
# Data to send for analysis
payload = {
"email": "[email protected]",
"ip_address": "192.168.1.1", # Optional: Include IP for richer analysis
"user_id": "user123", # Optional: A unique identifier for the user
"session_id": "sessionABC", # Optional: A unique identifier for the session
"transaction_id": "txnXYZ" # Optional: A unique identifier for the transaction
}
headers = {
"Content-Type": "application/json",
"X-API-KEY": API_KEY
}
try:
response = requests.post(EMAIL_API_URL, headers=headers, data=json.dumps(payload))
response.raise_for_status() # Raise an exception for HTTP errors
print("Request successful!")
print(json.dumps(response.json(), indent=2))
except requests.exceptions.HTTPError as http_err:
print(f"HTTP error occurred: {http_err}")
print(f"Response body: {response.text}")
except requests.exceptions.ConnectionError as conn_err:
print(f"Connection error occurred: {conn_err}")
except requests.exceptions.Timeout as timeout_err:
print(f"Timeout error occurred: {timeout_err}")
except requests.exceptions.RequestException as req_err:
print(f"An unexpected error occurred: {req_err}")
In this example, the email-api endpoint is used. The payload includes the email address to be analyzed, and optionally, an IP address, user ID, session ID, and transaction ID, which can significantly enhance the accuracy of the fraud assessment. The X-API-KEY header carries your API key for authentication. A successful response will contain a JSON object with various data points and a fraud score, indicating the risk associated with the provided email. The SEON Email API documentation provides further details on expected request and response structures.
Key elements of the request:
- Endpoint URL: Constructed using the base API URL and your Merchant ID.
- Headers: Specifies
Content-Type: application/jsonand includes yourX-API-KEY. - Payload (Body): A JSON object containing the data points for analysis. The more data you provide, the more comprehensive SEON's assessment will be.
After executing this code, examine the output. A successful response will include a data object containing enriched information about the email, such as its registration date, domain details, and associated social media accounts, along with a fraud_score. This score is a primary indicator of risk, allowing you to automate decisions or flag suspicious activities for manual review.
Common next steps
Once you've successfully made your first API call, you can expand your integration to leverage more of SEON's fraud prevention capabilities. The platform offers a range of tools beyond simple email analysis.
Expand Data Points
SEON's effectiveness increases with the amount and variety of data it receives. Consider integrating additional data points from your application, such as:
- Device Fingerprinting: Implement the SEON Device Fingerprinting SDKs (JavaScript, Android, iOS) to collect unique identifiers about the user's device. This helps detect suspicious patterns like multiple accounts from the same device or unusual device changes SEON Device Fingerprinting integration guides.
- Phone Analysis: Send phone numbers to the API to check their validity, carrier information, and potential links to fraud databases.
- IP Analysis: Provide the user's IP address to assess its risk, including VPN detection, proxy usage, and geographic inconsistencies.
- Transaction Details: For e-commerce or financial applications, include transaction-specific data like amount, currency, payment method, and shipping address.
Integrate with User Flows
Identify key points in your user journey where fraud detection is critical:
- Account Registration: Analyze email, phone, and IP during signup to prevent fraudulent accounts.
- Login Attempts: Detect account takeover attempts by monitoring unusual login patterns or device changes.
- Transaction Processing: Evaluate transactions in real-time or asynchronously to prevent chargebacks and financial fraud.
- Withdrawals/Payouts: Verify recipient details before releasing funds to mitigate financial loss.
Implement Decision Logic
Based on the fraud score and detailed data returned by SEON, implement automated decision-making. This could involve:
- Accept: Transactions or actions with a very low fraud score.
- Decline: High-risk transactions that exceed a predefined threshold.
- Review: Moderate-risk cases that require manual investigation by your fraud team.
- Challenge: Trigger additional verification steps (e.g., 2FA, document upload) for suspicious but not immediately fraudulent activities.
Utilize the Admin Panel
The SEON Admin Panel offers tools for:
- Rule Management: Customize or create new fraud rules based on your specific business logic and risk appetite.
- Case Management: Review and manage cases flagged for manual inspection.
- Analytics and Reporting: Monitor fraud trends, review performance metrics, and optimize your fraud prevention strategy.
- Whitelisting/Blacklisting: Manage trusted or suspicious entities.
For more advanced integrations, consider exploring SEON's webhooks for real-time notifications about fraud events or changes in risk scores. This allows your system to react immediately without continuous polling of the API. Webhooks are a common mechanism for event-driven architectures, widely used in API integrations for services like payment gateways and communication platforms Twilio's webhook security guide.
Troubleshooting the first call
Encountering issues during your first API call is common. Here's a guide to diagnose and resolve typical problems:
Common Issues and Solutions:
| Problem | What to Check | Where to Check |
|---|---|---|
| 401 Unauthorized / Invalid API Key |
|
|
| 400 Bad Request / Invalid Payload |
|
|
| Network Connection Errors (Timeout, Connection Refused) |
|
|
| 5xx Server Errors (Internal Server Error) |
|
|
| Unexpected Response Structure |
|
|
General Troubleshooting Tips:
- Use a tool like Postman or Insomnia: These tools allow you to construct and send API requests manually, helping to isolate issues related to your code versus the API itself.
- Check Server Logs: If you're running your code on a server, check its logs for any error messages that might provide more context.
- Consult SEON Documentation: The official SEON documentation is the most authoritative source for API specifications, error codes, and troubleshooting guides.
- Contact Support: If you've exhausted all self-help options, reach out to SEON's support team with details of your request, error messages, and steps you've already taken.
By systematically checking these points, you can efficiently resolve most issues encountered during the initial integration phase and proceed with building out your fraud prevention logic.