Fraud API Request
SEON's proprietary API combines our Email, Phone, IP, BIN and AML APIs with device fingerprinting so that you can request and receive our enriched data, rules and scoring in a single API call. This page covers the request; see Fraud API Response for what comes back and JavaScript Agent v6 for collecting the session device fingerprint.
For more context on how to begin your API integration check the Introduction section or the Integration Guide.
Table of Contents
Good to know
- The API is fully modular — enable or disable each sub-API (Email, Phone, IP, AML) and the device fingerprinting tool through the
configobject. - Use the
custom_fieldsobject to send almost any custom data point to SEON. Your team can build rules on custom fields to create a completely custom ruleset. - All SEON API requests are case-sensitive. Follow the formatting below to avoid errors.
- Populate all name-related fields as fully as you can (
user_fullname,user_firstname,user_middlename,user_lastname) — identity checks get materially better with each one. - Device fingerprinting data arrives in
device_detailsand is also visible on the Transaction Details page of the Admin Panel.
Endpoints
The EU Transaction Processing Environment is the default. If you are on a non-EU environment, use its regional endpoint instead — contact SEON for access.
| Environment | Endpoint |
|---|---|
| EU (default) | https://api.seon.io/SeonRestService/fraud-api/v2.0 |
| US | https://api.us-east-1-main.seon.io/SeonRestService/fraud-api/v2/ |
| Middle East | https://api.me-central-1-main.seon.io/SeonRestService/fraud-api/v2/ |
| APAC | https://api.ap-southeast-1-main.seon.io/SeonRestService/fraud-api/v2/ |
https://api.seon.io/SeonRestService/fraud-api/v2.0X-API-KEY: Your SEON license key, from the Organization page.https://api.us-east-1-main.seon.io/SeonRestService/fraud-api/v2.0 · Middle East https://api.me-central-1-main.seon.io/SeonRestService/fraud-api/v2.0 · APAC https://api.ap-southeast-1-main.seon.io/SeonRestService/fraud-api/v2.0Request attributes
Every attribute is optional. Send as much as you have: the more context SEON receives, the more signals the scoring engine can use.
configobjectEnables the sub-APIs and tunes each one. The API is fully modular: a module runs only when its *_api flag is true.
17 child attributes
ip_apibooleanRun the IP API. Always recommended.
email_apibooleanRun the Email API. Best placed at the earliest user access point.
phone_apibooleanRun the Phone API. Best placed at the earliest user access point.
address_apibooleanRun Address Intelligence. Must be true for any address verification to occur — when absent or false no verification runs and no address-related billing is incurred.
aml_apibooleanRun the AML API. Best placed at the earliest user access point.
aml_bank_screening_apibooleanRun AML bank checks for the sender and/or the counterparty as part of AML payment screening.
ekyc_apibooleanRun the eKYC checks. See the eKYC payload examples for the per-country type values.
device_fingerprintingbooleanProcess the device fingerprint collected by the JavaScript Agent or a mobile SDK.
response_fieldsstringComma-separated list of the data points you want in the data block. When omitted the response contains the defaults: id, state, fraud_score, ip_details, email_details, phone_details, bin_details, version, applied_rules, device_details, calculation_time, seon_id, blackbox_score.
All accepted values: id, state, fraud_score, rule_category_details, ip_details, email_details, phone_details, bin_details, aml_details, aml_bank_screening_details, version, applied_rules, device_details, calculation_time, seon_id, blackbox_score, geolocation_details, string_analyses, ekyc_result.
ipobjectParameters for the IP API request.
3 child attributes
versionstringVersion of the IP API. Example: v1.
includestringComma-separated extra data points. See the IP API reference. Examples: flags, history, id.
flags_timeframe_daysintegerWhen using flags, the timeframe to consider, in days.
emailobjectParameters for the Email API request.
5 child attributes
versionstringVersion of the Email API. Example: v3.
timeoutintegerTimeout for this Email API request in milliseconds. See Timeouts. Example: 2000.
priority_timeoutintegerHow long to wait for a priority site, in milliseconds. See Priority timeouts.
priority_sitesstringThe sites to return with priority. See Priority timeouts.
flags_timeframe_daysintegerWhen using flags, the timeframe to consider, in days.
phoneobjectParameters for the Phone API request.
6 child attributes
versionstringVersion of the Phone API. Example: v2.
timeoutintegerTimeout for this Phone API request in milliseconds. See Timeouts. Example: 2000.
priority_timeoutintegerHow long to wait for a priority site, in milliseconds.
priority_sitesstringThe sites to return with priority.
includestringComma-separated extra data points. See the Phone API reference. Examples: flags, history, id, hlr_details, cnam_lookup. hlr_details and cnam_lookup are not enabled by default and carry additional fees.
flags_timeframe_daysintegerWhen using flags, the timeframe to consider, in days.
addressobjectParameters for the Address Intelligence request.
3 child attributes
verify_user_addressbooleanVerify the user_* address fields.
verify_billing_addressbooleanVerify the billing_* address fields.
verify_shipping_addressbooleanVerify the shipping_* address fields.
deviceobjectParameters for the device fingerprint request.
1 child attribute
includestringComma-separated list of extra device data points. Use only one of device_location, extended_device_location or extended_network_location; if several are given, the extended one wins. device_location adds the geolocation fields; extended_device_location also adds reverse-geocoded fields such as country and state.
amlobjectParameters for the AML API request.
10 child attributes
versionstringVersion of the AML API. Example: v1.
timeoutintegerTimeout for this AML API request in milliseconds. Example: 2000.
typestringEntity type. ENTITY covers businesses, organizations, vessels and aircraft. With UNKNOWN, SEON determines the type and searches the relevant database. Ignored when payment_screening is configured.
search_profile_idstringThe 10-character ID of the search profile used for AML screening. Default profile: sysdefault. Ignored when payment_screening is configured, and ignored when the legacy fuzzy_enabled / fuzzy_config / sources parameters are present.
monitoring_requiredbooleanEnable ongoing monitoring for this person. Forbidden when payment_screening is configured.
monitoring_schedulestringMonitoring interval for this person. Forbidden when payment_screening is configured.
payment_screeningobjectConfigures AML payment screening. When present, monitoring_required and monitoring_schedule cannot be used.
2 child attributes
sender_configobjectAML payment screening configuration for one party. sender_config uses the user_* attributes from the payload; receiver_config uses the receiver_* attributes.
5 child attributes
typestringEntity type for this party. With UNKNOWN, SEON determines the type and searches the relevant database.
search_profile_idstringThe 10-character search profile ID used for this party. Default: sysdefault.
fuzzy_enabledbooleanLegacy fuzzy-search switch. Superseded by search_profile_id.
fuzzy_configobjectLegacy fuzzy-search tuning. Superseded by search_profile_id.
sourcesobjectLegacy per-source switches. Superseded by search_profile_id.
receiver_configobjectAML payment screening configuration for one party. sender_config uses the user_* attributes from the payload; receiver_config uses the receiver_* attributes.
5 child attributes
typestringEntity type for this party. With UNKNOWN, SEON determines the type and searches the relevant database.
search_profile_idstringThe 10-character search profile ID used for this party. Default: sysdefault.
fuzzy_enabledbooleanLegacy fuzzy-search switch. Superseded by search_profile_id.
fuzzy_configobjectLegacy fuzzy-search tuning. Superseded by search_profile_id.
sourcesobjectLegacy per-source switches. Superseded by search_profile_id.
fuzzy_enabledbooleanLegacy switch between exact and fuzzy search. Superseded by search_profile_id. Ignored when payment_screening is configured.
fuzzy_configobjectLegacy fuzzy-search tuning (phonetic_search_enabled, edit_distance_enabled and the scoring thresholds). Superseded by search_profile_id — see Using fuzzy search in AML queries for the full field list.
sourcesobjectLegacy per-source switches (sanction_enabled, pep_enabled, watchlist_enabled, crimelist_enabled, adversemedia_enabled and the Brazilian local_aml_sources). Superseded by search_profile_id. Adverse media and local AML sources are not enabled by default and carry additional fees.
aml_bank_screeningobjectAdds bank screening against sanctions lists on top of AML payment screening.
6 child attributes
bank_name_checkbooleanCheck bank names against sanctions using user_bank_name and receiver_bank_name.
bank_account_checkbooleanCheck bank account numbers against sanctions using user_bank_account and receiver_bank_account.
bank_swift_checkbooleanCheck SWIFT codes against sanctions using user_bank_swift and receiver_bank_swift.
match_modestringHow the enabled bank checks combine.
partial_match_thresholdnumberFuzzy match score for bank name checks.
result_limitnumberMaximum number of hits in the result set.
eKYCobjectParameters for the eKYC API request.
2 child attributes
timeoutintegerMilliseconds to wait for the eKYC service.
typestringThe abbreviated name of the check for the country, for example BR_ID_CPF. See the eKYC payload examples.
action_typestringThe type of user action being scored. Any string is valid, such as purchase, recur_purchase, deposit, withdrawal, account_register, account_login, account_login_fail, account_password_change, account_email_change, account_edit, add_item_to_cart, remove_item_from_cart, add_promotion, create_content, account_logout, submit_review, update_content, verification, money_transfer.
ipstringUser's IP address at the time of the transaction. Send the full IPv4 or IPv6 address.
transaction_idstringUnique identifier for the transaction in your system. Generated automatically if omitted. Example: 98db9a56b2e3.
affiliate_idstringUser's unique affiliate identifier in your system.
affiliate_namestringName of the affiliate for the registered user. May be ASCII-encoded via a secure hash (MD5, SHA-2). Example: jdoe345.
order_memostringThe description of the transaction as found in your system.
emailstring (email)Full email address of the registered user.
email_domainstringEmail address domain of the registered user. Example: gmail.com.
payment_idstringUnique identifier for a payment transaction.
password_hashstringHash of the user's password in ASCII encoding. HMAC-SHA256 or RSA-SHA256 recommended.
user_fullnamestringUser's registered full name. May be hashed in ASCII encoding (MD5, SHA-2). Example: John Doe.
user_namestringUser's registered username. May be hashed in ASCII encoding (MD5, SHA-2). Example: jdoe325.
user_firstnamestringFirst name of the user.
user_middlenamestringMiddle name of the user.
user_lastnamestringLast name of the user.
user_pobstringPlace of birth of the user.
user_photoid_numberstringPhoto ID number for the user. Must hold a real CPF number for the Brazilian local AML checks.
user_idstringUser's unique identifier in your system. If omitted, an ID is generated from user_name and email (or whichever is present), and randomly when neither is. Example: 00ab11-as2233.
user_createdintegerDate the user first registered on your site, as a UNIX timestamp in UTC without milliseconds. Example: 1446370717.
user_categorystringThe user's category in your system.
user_account_statusstringUser's current account status. Example: login_blocked.
user_bank_accountstringUser's bank account number for a monetary transfer, for example the IBAN.
user_bank_namestringName of the user's bank.
user_bank_swiftstringUser's bank SWIFT code for a monetary transfer.
user_bank_countrystringTwo-character ISO 3166-1 country code of the user's bank.
user_balancenumberUser's current balance. Example: 1010.25.
user_verification_levelstringUser's verification level. Example: ID_verified.
user_dobstring (date)User's date of birth in YYYY-MM-DD format. Example: 1983-01-01.
user_countrystringTwo-character ISO 3166-1 country code for the user's registered address. Examples: US, DE. Mandatory for Address Intelligence.
user_citystringFull city name of the user's registered address. Examples: London, New York.
user_regionstringTwo-character ISO 3166-2 state or region code for the user's registered address. Examples: NY, DE.
user_zipstringZip/postal code of the user's registered address. Examples: 10005, PH1 1EU.
user_streetstringUser's registered street address line 1. May be hashed in ASCII encoding. Example: 157 W 26th St. Mandatory for Address Intelligence.
user_street2stringUser's registered street address line 2. May be hashed in ASCII encoding. Example: Apt. 432.
session_idstringA custom, unique ID that links a user's device data to transactions, typically derived from the current browsing session (a tracking cookie, for example). With JavaScript Agent v6 send the encrypted payload in session instead.
sessionstringThe base64-encoded, encrypted session payload returned by seon.getSession() (JavaScript Agent) or the mobile SDKs. Only compatible with Fraud API v2.0. See JavaScript Agent v6.
device_idstringA third-party device fingerprint ID. Use this only when you already run another device fingerprinting solution and want to link its IDs to SEON transactions or build rules on them.
payment_modestringMethod of payment used. Examples: card, paypal, wire transfer, bitcoin.
payment_providerstringName of the payment service provider for the transaction. Example: skrill.
card_fullnamestringUser's full name as found on the card. May be hashed in ASCII encoding.
card_binstringThe first 6, 7, 8 or 9 digits of the card number.
card_hashstringHash of the card used, in ASCII encoding. HMAC-SHA256 or RSA-SHA256 recommended; MD5 is strongly discouraged.
card_expirestringCard's expiration date. Example: 2022-01.
card_laststringThe last 4 digits of the card number, which help identify the uniqueness of the card.
avs_resultstringStandard AVS code returned by the card processor. Examples: N, A, AE1.
cvv_resultbooleanResult of the CVV check.
status_3dstringStatus of the 3D Secure result. Examples: Y, A, N.
sca_methodstringMethod of Strong Customer Authentication. Example: 2FA.
phone_numberstringRegistered phone number of the user, including country code. No spaces or hyphens; the leading + is optional. Example: 36704316088.
transaction_typestringTransaction type according to your business. Examples: purchase, return.
transaction_amountnumberFull transaction amount, with . as the decimal point. Example: 539.99.
transaction_currencystringISO 4217 currency code in CAPITAL letters. Cryptocurrencies are also supported. Examples: EUR, USD, BTC, USDT.
transaction_long_textstringFree-text description attached to the transaction, such as a transfer reference.
itemsarray of objectList of items in the transaction. Every field prefixed with item_ belongs to this array.
9 child attributes
item_idstringUnique product identifier in your system.
item_quantityintegerQuantity of the purchased item.
item_namestringName of the purchased item. Example: Apple iPhone 6S 128Gb Silver.
item_pricenumberPrice of the purchased item, with . as the decimal point. Example: 539.99.
item_storestringThe store that fulfils the order. On a marketplace, merchant_id identifies the marketplace taking the order and item_store the store fulfilling it. Example: Brooklyn Electronics.
item_store_countrystringTwo-character ISO 3166-1 country code for the item_store. Examples: US, DE.
item_categorystringCategory the item belongs to.
item_urlstringURL of the product's description. Example: https://electronics.example.com/pd_1234.php.
item_custom_fieldsobjectUnlimited user-defined fields for the item — string, boolean or integer. Examples: color, size.
shipping_countrystringTwo-character ISO 3166-1 country code for the shipping address. Examples: US, DE. Mandatory for Address Intelligence.
shipping_citystringFull city name of the shipping address. Examples: London, New York.
shipping_regionstringTwo-character ISO 3166-2 state or region code for the shipping address. Examples: NY, DE.
shipping_zipstringZip/postal code of the shipping address. Examples: 10005, PH1 1EU.
shipping_streetstringShipping street address line 1. May be hashed in ASCII encoding. Example: 157 W 26th St. Mandatory for Address Intelligence.
shipping_street2stringShipping street address line 2. May be hashed in ASCII encoding. Example: Apt. 432.
shipping_phonestringPhone number for the shipping address, including country code. No spaces or hyphens. Example: 36704316088.
shipping_fullnamestringFull name on the shipping address. May be hashed in ASCII encoding. Example: John Doe.
shipping_methodstringThe shipping method used by the customer. Examples: standard, UPS, FedEx.
billing_countrystringTwo-character ISO 3166-1 country code for the billing address. Examples: US, DE. Mandatory for Address Intelligence.
billing_citystringFull city name of the billing address. Examples: London, New York.
billing_regionstringTwo-character ISO 3166-2 state or region code for the billing address. Examples: NY, DE.
billing_zipstringZip/postal code of the billing address. Examples: 10005, PH1 1EU.
billing_streetstringBilling street address line 1. May be an MD5 hash in ASCII encoding. Example: 157 W 26th St. Mandatory for Address Intelligence.
billing_street2stringBilling street address line 2. May be an MD5 hash in ASCII encoding. Example: Apt. 432.
billing_phonestringPhone number for the billing address, including country code. No spaces or hyphens. Example: 36704316088.
pos_latnumberLatitude of the point of sale where the transaction happened.
pos_longnumberLongitude of the point of sale where the transaction happened.
custom_latnumberLatitude of a custom location you want distances measured against.
custom_longnumberLongitude of a custom location you want distances measured against.
discount_codestringThe discount code the user applied during checkout.
giftbooleanWhether the order was marked as a gift by the user.
gift_messagebooleanWhether the order has a gift message attached by the user.
merchant_categorystringCategory of the merchant. Example: digital_item_seller.
merchant_idstringUnique merchant identifier, if you process orders from several merchants. Example: ab01-cd23-4567.
merchant_namestringThe business name of the merchant.
merchant_created_atintegerDate the merchant was created on your site, as a UNIX timestamp in UTC. Example: 1446370717.
merchant_countrystringTwo-character ISO 3166-1 country code for the merchant's address. Examples: US, DE.
receiver_fullnamestringReceiver's (counterparty's) full name for a monetary transfer.
receiver_firstnamestringReceiver's (counterparty's) first name.
receiver_middlenamestringReceiver's (counterparty's) middle name.
receiver_lastnamestringReceiver's (counterparty's) last name.
receiver_dobstring (date)Receiver's (counterparty's) date of birth in YYYY-MM-DD format. Example: 1983-01-01.
receiver_pobstringReceiver's (counterparty's) place of birth.
receiver_idstringReceiver's (counterparty's) unique identifier in your system.
receiver_countrystringTwo-character ISO 3166-1 country code for the receiver's registered address. Examples: US, DE.
receiver_photoid_numberstringReceiver's (counterparty's) photo ID number for a monetary transfer.
receiver_bank_accountstringReceiver's (counterparty's) bank account number, for example the IBAN.
receiver_bank_swiftstringReceiver's (counterparty's) bank SWIFT code.
receiver_bank_namestringName of the receiver's (counterparty's) bank.
receiver_bank_countrystringTwo-character ISO 3166-1 country code of the receiver's bank.
details_urlstringURL of the transaction in your own management platform. Example: electronics.example.com/orders/order-1234.
regulationstringLicense or market name for a gambling operator. Example: MGA.
bonus_campaign_idstringBonus campaign's unique identifier. Example: bonus100.
brand_idstringBrand's unique identifier. Example: brand123.
custom_fieldsobjectUnlimited custom key-value pairs that feed the machine learning system and the scoring engine. Values may be strings, booleans or numbers; names may contain only lowercase letters, numbers and underscores. Examples: is_intangible_item, is_pay_on_delivery, departure_airport, arrival_airport, days_to_board.
Example request
{
"config": {
"ip": {
"version": "v1",
"include": "flags,history,id"
},
"email": {
"version": "v3"
},
"phone": {
"version": "v2"
},
"ip_api": true,
"email_api": true,
"phone_api": true,
"device_fingerprinting": true
},
"action_type": "purchase",
"ip": "192.0.2.44",
"transaction_id": "tx-98db9a56b2e3",
"email": "john.doe@example.com",
"phone_number": "36704316088",
"user_id": "00ab11-as2233",
"user_fullname": "John Doe",
"user_created": 1446370717,
"user_country": "US",
"user_city": "New York",
"user_zip": "10005",
"user_street": "157 W 26th St",
"session": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"payment_mode": "card",
"card_bin": "414141",
"card_last": "1234",
"transaction_type": "purchase",
"transaction_amount": 539.99,
"transaction_currency": "USD",
"custom_fields": {
"is_intangible_item": false,
"departure_airport": "JFK"
}
}Code samples
curl -X POST "https://api.seon.io/SeonRestService/fraud-api/v2.0" \
-H "Content-Type: application/json" \
-H "X-API-KEY: $SEON_LICENSE_KEY" \
-d '{
"config": {
"ip_api": true,
"email_api": true,
"phone_api": true,
"device_fingerprinting": true
},
"action_type": "purchase",
"ip": "192.0.2.44",
"email": "john.doe@example.com",
"phone_number": "36704316088",
"user_id": "00ab11-as2233",
"session": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"transaction_amount": 539.99,
"transaction_currency": "USD"
}'import os
import requests
response = requests.post(
"https://api.seon.io/SeonRestService/fraud-api/v2.0",
headers={
"Content-Type": "application/json",
"X-API-KEY": os.environ["SEON_LICENSE_KEY"],
},
json={
"config": {
"ip_api": True,
"email_api": True,
"phone_api": True,
"device_fingerprinting": True,
},
"action_type": "purchase",
"ip": "192.0.2.44",
"email": "john.doe@example.com",
"phone_number": "36704316088",
"user_id": "00ab11-as2233",
# `session` comes from seon.getSession() in the browser.
"session": session_payload,
"transaction_amount": 539.99,
"transaction_currency": "USD",
},
)
body = response.json()
if not body["success"]:
raise RuntimeError(body["error"])
data = body["data"]
print(data["state"], data["fraud_score"])const response = await fetch("https://api.seon.io/SeonRestService/fraud-api/v2.0", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-KEY": process.env.SEON_LICENSE_KEY,
},
body: JSON.stringify({
config: {
ip_api: true,
email_api: true,
phone_api: true,
device_fingerprinting: true,
},
action_type: "purchase",
ip: "192.0.2.44",
email: "john.doe@example.com",
phone_number: "36704316088",
user_id: "00ab11-as2233",
// `session` is the payload returned by seon.getSession().
session: sessionPayload,
transaction_amount: 539.99,
transaction_currency: "USD",
}),
});
const body = await response.json();
if (!body.success) throw new Error(JSON.stringify(body.error));
const { state, fraud_score: fraudScore, device_details: device } = body.data;
console.log(state, fraudScore, device?.suspicious_flags);<?php
const LICENSE_KEY = 'xxxxxxxxxxxxx-xxxxxxxxxxxxxxx-xxxxxxxxxxxx';
$payload = [
'config' => [
'ip' => ['version' => 'v1', 'include' => 'flags,history,id'],
'email' => ['version' => 'v3'],
'phone' => ['version' => 'v2'],
'ip_api' => true,
'email_api' => true,
'phone_api' => true,
'device_fingerprinting' => true,
],
'action_type' => 'withdrawal',
'ip' => '192.0.2.44',
'email' => 'john.doe@example.com',
'phone_number' => '36704316088',
'user_id' => '00ab11-as2233',
'session' => $sessionPayload,
'transaction_amount' => 539.99,
'transaction_currency' => 'USD',
];
$ch = curl_init('https://api.seon.io/SeonRestService/fraud-api/v2.0');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'X-API-KEY: ' . LICENSE_KEY,
],
CURLOPT_POSTFIELDS => json_encode($payload),
]);
$response = curl_exec($ch);
$error = curl_error($ch);
curl_close($ch);
if ($error) {
echo 'Request failed: ' . $error;
} else {
$body = json_decode($response, true);
echo $body['data']['state'] . ' ' . $body['data']['fraud_score'];
}Next steps
- Fraud API Response — the response attributes and every error code
- JavaScript Agent v6 — collecting the
sessiondevice fingerprint - Timeouts — per-module timeout behaviour
- eKYC payload examples — per-country check types for
config.eKYC.type - AML payload examples — worked
config.amlconfigurations
For additional support, contact your SEON representative.