Skip to main content
Skip table of contents

ThreatMetrix™

ThreatMetrix by LexisNexis® is a robust cybersecurity solution used to fortify Merchants and their associated Referrers/Facilitators against potential threats. Leveraging the ThreatMetrix™ integration on this platform, risk analysts can authenticate user identities and any suspicious activities to bolster transaction security by reviewing user behavior, and anomalies in Merchant actions, quickly identifying fraudulent activities.

Introduction to Profiling

Profiling is the process of placing tags within a web application specific to data processing. You will need to identify the pages in your web application that provide the optimal opportunity for profiling. Typically, profiling takes between 2 and 5 seconds to complete, so when selecting the page(s), typically, those containing forms that require the maximum data input will ensure that the visitor stays on the page for the time necessary to complete profiling.

Please note that the majority of profiling is completed within a fraction of a second but may take up to 5 seconds to collect the full set of profiling attributes. Below are some common examples of pages that can be used for this profiling tag placement:

  • Account Creation page - A page in which a visitor registers as a new user of a website.

  • Payments page - A page in which a payment, transaction, or checkout is processed.

  • Login page - A page in which a visitor logs into a website.


Integrate ThreatMetrix™ Session ID - Merchant Signup & New Transaction

Due to the integration method shown below to add a ThreatMetrix Session ID, there is no direct development work needed for PayFields, PayFrames, or any White-labeled Merchant Signup forms.

To integrate the ThreatMetrix™ Session ID, you’ll need to generate one. Use the following API call below to generate a new tmxSessionId value:

CODE
GET /tmxScriptInjection HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: api-test.payrix.com
APIKEY:{{private_api_key}}

Example Response

JS
var __tmx_service_url__="https://h.online-metrix.net/fp/tags.js",__tmx_session_nscript_url__="https://h.online-metrix.net/fp/tags",__txm_org_id__="5mee3gqn",__tmx_session_id__="03d566ba-19a5-4459-9b29-5e2a4463f245";function autoLoadThreatMetrics(){const _=document.createElement("script");_.src=__tmx_service_url__.concat("?org_id="+__txm_org_id__).concat("&session_id="+__tmx_session_id__),document.head.appendChild(_)}autoLoadThreatMetrics();const iframeNoscript=document.createElement("noscript"),iframe=document.createElement("iframe"),tmxSessionIdHTML=(iframe.src=__tmx_session_nscript_url__.concat("?org_id="+__txm_org_id__).concat("&session_id="+__tmx_session_id__),iframe.style.display="none",iframeNoscript.appendChild(iframe),document.createElement("input"));tmxSessionIdHTML.type="hidden",tmxSessionIdHTML.name="__tmx__session__id",tmxSessionIdHTML.value=__tmx_session_id__,document.body.appendChild(iframeNoscript),document.body.appendChild(tmxSessionIdHTML),iframe.addEventListener("load",function(){console.log("Threat Metrics are set.")});

Gather the tmx_session_id__ value from the following section of the response body:

CODE
tmx_session_id__="03d566ba-19a5-4459-9b29-5e2a4463f245"

Note: The tmx_session_id value will be different each time the endpoint is called.

Then use this value as the valid value for the tmxSessionId parameter when performing either of the following API requests to integrate the ThreatMetrix™ Session ID:

  • POST /merchants - New Merchant Signup

Example Request Body - Create a new Merchant and assign a ThreatMetrix™ Session ID.
JSON
{
  "entity": t1_ent_xxxxxxxxxxxx
  "New": 0,
  "type" : 1,
  "AnnualCCSales": 1000000,
  "avgTicket": 1250,
  "environment": "ecommerce",
  "status": "Ready"
  "saqDate": "Bakery 1710",
  "name": "Bakery 1710",
  "address1": "123 Happy",
  "address2": "123",
  "city": "Corpus Christi",
  "state": "TX",
  "zip": "78401",
  "country": "USA",
  "phone": "7025558096",
  "fax": null,
  "email": "Go.Lakers@testmail.com",
  "ein": "775661492",
  "website": "http://testwebsite.com",
  "custom": "example customer id",
  "tcVersion": "511",
  "tcDate": "2023-10-21 10:31:33",
  "tcAttestation": 1,
  "visaDisclosure": 1,
  "disclosureIP": "null",
  "disclosureDate": 20231020,
  "merchantIp": null,
  "currency": "USD",
  "tmxSessionId": "16a9508e007c82f33572ac0907f1ec1b",
  "merchant": {
      "dba": null,
      "new": "1",
      "mcc": "1799",
      "status": "1",
  ]
}
  • POST /txns - New Transaction

Example Request Body - Create a new Transaction, assigned with a ThreatMetrix™ Session ID.
JSON
{
    "merchant": "t1_mer_xxxxxxxxxxxx",
    "type": "1",
    "origin": "2",
    "tmxSessionId": "16a9508e007c82f33572ac0907f1ec1b",
    "payment": {
        "number": "4242424242424242",
        "cvv": "123",
        "expiration": "1020"
    },
    "total": "10000"
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.