Speak with an Expert

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

  1. Good to know
  2. Endpoints
  3. Request attributes
  4. Example request
  5. Code samples

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 config object.
  • Use the custom_fields object 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_details and 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.

EnvironmentEndpoint
EU (default)https://api.seon.io/SeonRestService/fraud-api/v2.0
UShttps://api.us-east-1-main.seon.io/SeonRestService/fraud-api/v2/
Middle Easthttps://api.me-central-1-main.seon.io/SeonRestService/fraud-api/v2/
APAChttps://api.ap-southeast-1-main.seon.io/SeonRestService/fraud-api/v2/
POSThttps://api.seon.io/SeonRestService/fraud-api/v2.0
Header X-API-KEY: Your SEON license key, from the Organization page.
Regional endpoints: US 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.0

Request attributes

Every attribute is optional. Send as much as you have: the more context SEON receives, the more signals the scoring engine can use.

configobject

Enables 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_apiboolean

Run the IP API. Always recommended.

email_apiboolean

Run the Email API. Best placed at the earliest user access point.

phone_apiboolean

Run the Phone API. Best placed at the earliest user access point.

address_apiboolean

Run 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_apiboolean

Run the AML API. Best placed at the earliest user access point.

aml_bank_screening_apiboolean

Run AML bank checks for the sender and/or the counterparty as part of AML payment screening.

ekyc_apiboolean

Run the eKYC checks. See the eKYC payload examples for the per-country type values.

device_fingerprintingboolean

Process the device fingerprint collected by the JavaScript Agent or a mobile SDK.

response_fieldsstring

Comma-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.

ipobject

Parameters for the IP API request.

3 child attributes
versionstring

Version of the IP API. Example: v1.

includestring

Comma-separated extra data points. See the IP API reference. Examples: flags, history, id.

flags_timeframe_daysinteger

When using flags, the timeframe to consider, in days.

emailobject

Parameters for the Email API request.

5 child attributes
versionstring

Version of the Email API. Example: v3.

timeoutinteger

Timeout for this Email API request in milliseconds. See Timeouts. Example: 2000.

priority_timeoutinteger

How long to wait for a priority site, in milliseconds. See Priority timeouts.

priority_sitesstring

The sites to return with priority. See Priority timeouts.

flags_timeframe_daysinteger

When using flags, the timeframe to consider, in days.

phoneobject

Parameters for the Phone API request.

6 child attributes
versionstring

Version of the Phone API. Example: v2.

timeoutinteger

Timeout for this Phone API request in milliseconds. See Timeouts. Example: 2000.

priority_timeoutinteger

How long to wait for a priority site, in milliseconds.

priority_sitesstring

The sites to return with priority.

includestring

Comma-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_daysinteger

When using flags, the timeframe to consider, in days.

addressobject

Parameters for the Address Intelligence request.

3 child attributes
verify_user_addressboolean

Verify the user_* address fields.

Default false
verify_billing_addressboolean

Verify the billing_* address fields.

Default false
verify_shipping_addressboolean

Verify the shipping_* address fields.

Default false
deviceobject

Parameters for the device fingerprint request.

1 child attribute
includestring

Comma-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.

amlobject

Parameters for the AML API request.

10 child attributes
versionstring

Version of the AML API. Example: v1.

timeoutinteger

Timeout for this AML API request in milliseconds. Example: 2000.

typestring

Entity 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.

One of PERSON, ENTITY, UNKNOWN
search_profile_idstring

The 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_requiredboolean

Enable ongoing monitoring for this person. Forbidden when payment_screening is configured.

monitoring_schedulestring

Monitoring interval for this person. Forbidden when payment_screening is configured.

One of ON_CHANGE, DAILY, WEEKLY, MONTHLY, QUARTERLY, TWICE_A_YEAR, EVERY_YEAR
payment_screeningobject

Configures AML payment screening. When present, monitoring_required and monitoring_schedule cannot be used.

2 child attributes
sender_configobject

AML payment screening configuration for one party. sender_config uses the user_* attributes from the payload; receiver_config uses the receiver_* attributes.

5 child attributes
typestring

Entity type for this party. With UNKNOWN, SEON determines the type and searches the relevant database.

One of PERSON, ENTITY, UNKNOWN
search_profile_idstring

The 10-character search profile ID used for this party. Default: sysdefault.

fuzzy_enabledboolean

Legacy fuzzy-search switch. Superseded by search_profile_id.

fuzzy_configobject

Legacy fuzzy-search tuning. Superseded by search_profile_id.

sourcesobject

Legacy per-source switches. Superseded by search_profile_id.

receiver_configobject

AML payment screening configuration for one party. sender_config uses the user_* attributes from the payload; receiver_config uses the receiver_* attributes.

5 child attributes
typestring

Entity type for this party. With UNKNOWN, SEON determines the type and searches the relevant database.

One of PERSON, ENTITY, UNKNOWN
search_profile_idstring

The 10-character search profile ID used for this party. Default: sysdefault.

fuzzy_enabledboolean

Legacy fuzzy-search switch. Superseded by search_profile_id.

fuzzy_configobject

Legacy fuzzy-search tuning. Superseded by search_profile_id.

sourcesobject

Legacy per-source switches. Superseded by search_profile_id.

fuzzy_enabledboolean

Legacy switch between exact and fuzzy search. Superseded by search_profile_id. Ignored when payment_screening is configured.

Default false
fuzzy_configobject

Legacy 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.

sourcesobject

Legacy 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_screeningobject

Adds bank screening against sanctions lists on top of AML payment screening.

6 child attributes
bank_name_checkboolean

Check bank names against sanctions using user_bank_name and receiver_bank_name.

bank_account_checkboolean

Check bank account numbers against sanctions using user_bank_account and receiver_bank_account.

bank_swift_checkboolean

Check SWIFT codes against sanctions using user_bank_swift and receiver_bank_swift.

match_modestring

How the enabled bank checks combine.

One of OR, AND · Default OR
partial_match_thresholdnumber

Fuzzy match score for bank name checks.

Default 0.8 · min 0, max 1
result_limitnumber

Maximum number of hits in the result set.

Default 20
eKYCobject

Parameters for the eKYC API request.

2 child attributes
timeoutinteger

Milliseconds to wait for the eKYC service.

Default 3000
typestring

The abbreviated name of the check for the country, for example BR_ID_CPF. See the eKYC payload examples.

action_typestring

The 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.

ipstring

User's IP address at the time of the transaction. Send the full IPv4 or IPv6 address.

transaction_idstring

Unique identifier for the transaction in your system. Generated automatically if omitted. Example: 98db9a56b2e3.

max 255 chars
affiliate_idstring

User's unique affiliate identifier in your system.

affiliate_namestring

Name of the affiliate for the registered user. May be ASCII-encoded via a secure hash (MD5, SHA-2). Example: jdoe345.

order_memostring

The description of the transaction as found in your system.

emailstring (email)

Full email address of the registered user.

email_domainstring

Email address domain of the registered user. Example: gmail.com.

payment_idstring

Unique identifier for a payment transaction.

password_hashstring

Hash of the user's password in ASCII encoding. HMAC-SHA256 or RSA-SHA256 recommended.

user_fullnamestring

User's registered full name. May be hashed in ASCII encoding (MD5, SHA-2). Example: John Doe.

user_namestring

User's registered username. May be hashed in ASCII encoding (MD5, SHA-2). Example: jdoe325.

user_firstnamestring

First name of the user.

user_middlenamestring

Middle name of the user.

user_lastnamestring

Last name of the user.

user_pobstring

Place of birth of the user.

user_photoid_numberstring

Photo ID number for the user. Must hold a real CPF number for the Brazilian local AML checks.

user_idstring

User'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_createdinteger

Date the user first registered on your site, as a UNIX timestamp in UTC without milliseconds. Example: 1446370717.

user_categorystring

The user's category in your system.

user_account_statusstring

User's current account status. Example: login_blocked.

user_bank_accountstring

User's bank account number for a monetary transfer, for example the IBAN.

user_bank_namestring

Name of the user's bank.

user_bank_swiftstring

User's bank SWIFT code for a monetary transfer.

user_bank_countrystring

Two-character ISO 3166-1 country code of the user's bank.

user_balancenumber

User's current balance. Example: 1010.25.

user_verification_levelstring

User's verification level. Example: ID_verified.

user_dobstring (date)

User's date of birth in YYYY-MM-DD format. Example: 1983-01-01.

user_countrystring

Two-character ISO 3166-1 country code for the user's registered address. Examples: US, DE. Mandatory for Address Intelligence.

user_citystring

Full city name of the user's registered address. Examples: London, New York.

max 100 chars
user_regionstring

Two-character ISO 3166-2 state or region code for the user's registered address. Examples: NY, DE.

max 100 chars
user_zipstring

Zip/postal code of the user's registered address. Examples: 10005, PH1 1EU.

max 100 chars
user_streetstring

User's registered street address line 1. May be hashed in ASCII encoding. Example: 157 W 26th St. Mandatory for Address Intelligence.

max 100 chars
user_street2string

User's registered street address line 2. May be hashed in ASCII encoding. Example: Apt. 432.

max 100 chars
session_idstring

A 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.

max 64 chars
sessionstring

The 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_idstring

A 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_modestring

Method of payment used. Examples: card, paypal, wire transfer, bitcoin.

payment_providerstring

Name of the payment service provider for the transaction. Example: skrill.

card_fullnamestring

User's full name as found on the card. May be hashed in ASCII encoding.

card_binstring

The first 6, 7, 8 or 9 digits of the card number.

max 15 chars
card_hashstring

Hash of the card used, in ASCII encoding. HMAC-SHA256 or RSA-SHA256 recommended; MD5 is strongly discouraged.

max 500 chars
card_expirestring

Card's expiration date. Example: 2022-01.

card_laststring

The last 4 digits of the card number, which help identify the uniqueness of the card.

avs_resultstring

Standard AVS code returned by the card processor. Examples: N, A, AE1.

max 3 chars
cvv_resultboolean

Result of the CVV check.

status_3dstring

Status of the 3D Secure result. Examples: Y, A, N.

sca_methodstring

Method of Strong Customer Authentication. Example: 2FA.

phone_numberstring

Registered phone number of the user, including country code. No spaces or hyphens; the leading + is optional. Example: 36704316088.

max 19 chars
transaction_typestring

Transaction type according to your business. Examples: purchase, return.

transaction_amountnumber

Full transaction amount, with . as the decimal point. Example: 539.99.

transaction_currencystring

ISO 4217 currency code in CAPITAL letters. Cryptocurrencies are also supported. Examples: EUR, USD, BTC, USDT.

max 4 chars
transaction_long_textstring

Free-text description attached to the transaction, such as a transfer reference.

itemsarray of object

List of items in the transaction. Every field prefixed with item_ belongs to this array.

9 child attributes
item_idstring

Unique product identifier in your system.

item_quantityinteger

Quantity of the purchased item.

item_namestring

Name of the purchased item. Example: Apple iPhone 6S 128Gb Silver.

item_pricenumber

Price of the purchased item, with . as the decimal point. Example: 539.99.

item_storestring

The 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_countrystring

Two-character ISO 3166-1 country code for the item_store. Examples: US, DE.

item_categorystring

Category the item belongs to.

item_urlstring

URL of the product's description. Example: https://electronics.example.com/pd_1234.php.

item_custom_fieldsobject

Unlimited user-defined fields for the item — string, boolean or integer. Examples: color, size.

shipping_countrystring

Two-character ISO 3166-1 country code for the shipping address. Examples: US, DE. Mandatory for Address Intelligence.

shipping_citystring

Full city name of the shipping address. Examples: London, New York.

max 100 chars
shipping_regionstring

Two-character ISO 3166-2 state or region code for the shipping address. Examples: NY, DE.

max 100 chars
shipping_zipstring

Zip/postal code of the shipping address. Examples: 10005, PH1 1EU.

max 100 chars
shipping_streetstring

Shipping street address line 1. May be hashed in ASCII encoding. Example: 157 W 26th St. Mandatory for Address Intelligence.

max 100 chars
shipping_street2string

Shipping street address line 2. May be hashed in ASCII encoding. Example: Apt. 432.

max 100 chars
shipping_phonestring

Phone number for the shipping address, including country code. No spaces or hyphens. Example: 36704316088.

max 19 chars
shipping_fullnamestring

Full name on the shipping address. May be hashed in ASCII encoding. Example: John Doe.

shipping_methodstring

The shipping method used by the customer. Examples: standard, UPS, FedEx.

max 50 chars
billing_countrystring

Two-character ISO 3166-1 country code for the billing address. Examples: US, DE. Mandatory for Address Intelligence.

billing_citystring

Full city name of the billing address. Examples: London, New York.

max 100 chars
billing_regionstring

Two-character ISO 3166-2 state or region code for the billing address. Examples: NY, DE.

max 100 chars
billing_zipstring

Zip/postal code of the billing address. Examples: 10005, PH1 1EU.

max 100 chars
billing_streetstring

Billing street address line 1. May be an MD5 hash in ASCII encoding. Example: 157 W 26th St. Mandatory for Address Intelligence.

max 100 chars
billing_street2string

Billing street address line 2. May be an MD5 hash in ASCII encoding. Example: Apt. 432.

max 100 chars
billing_phonestring

Phone number for the billing address, including country code. No spaces or hyphens. Example: 36704316088.

max 19 chars
pos_latnumber

Latitude of the point of sale where the transaction happened.

pos_longnumber

Longitude of the point of sale where the transaction happened.

custom_latnumber

Latitude of a custom location you want distances measured against.

custom_longnumber

Longitude of a custom location you want distances measured against.

discount_codestring

The discount code the user applied during checkout.

max 50 chars
giftboolean

Whether the order was marked as a gift by the user.

gift_messageboolean

Whether the order has a gift message attached by the user.

merchant_categorystring

Category of the merchant. Example: digital_item_seller.

merchant_idstring

Unique merchant identifier, if you process orders from several merchants. Example: ab01-cd23-4567.

merchant_namestring

The business name of the merchant.

merchant_created_atinteger

Date the merchant was created on your site, as a UNIX timestamp in UTC. Example: 1446370717.

merchant_countrystring

Two-character ISO 3166-1 country code for the merchant's address. Examples: US, DE.

receiver_fullnamestring

Receiver's (counterparty's) full name for a monetary transfer.

receiver_firstnamestring

Receiver's (counterparty's) first name.

receiver_middlenamestring

Receiver's (counterparty's) middle name.

receiver_lastnamestring

Receiver'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_pobstring

Receiver's (counterparty's) place of birth.

receiver_idstring

Receiver's (counterparty's) unique identifier in your system.

receiver_countrystring

Two-character ISO 3166-1 country code for the receiver's registered address. Examples: US, DE.

receiver_photoid_numberstring

Receiver's (counterparty's) photo ID number for a monetary transfer.

receiver_bank_accountstring

Receiver's (counterparty's) bank account number, for example the IBAN.

receiver_bank_swiftstring

Receiver's (counterparty's) bank SWIFT code.

receiver_bank_namestring

Name of the receiver's (counterparty's) bank.

receiver_bank_countrystring

Two-character ISO 3166-1 country code of the receiver's bank.

details_urlstring

URL of the transaction in your own management platform. Example: electronics.example.com/orders/order-1234.

regulationstring

License or market name for a gambling operator. Example: MGA.

bonus_campaign_idstring

Bonus campaign's unique identifier. Example: bonus100.

brand_idstring

Brand's unique identifier. Example: brand123.

custom_fieldsobject

Unlimited 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.

max 200 chars

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

For additional support, contact your SEON representative.