These docs are for v2.0. Click to read the latest docs for v3.0.

Signifyd’s device profiling solution uniquely tracks and identifies devices and behaviors used by customers and criminals that are attempting transactions on your site.

📘

Note

Merchants who already utilize a compatible device profiling solution may, instead of deploying Signifyd's device profiling script, send device information via the device field in the relevant API calls.

Setup

If your integration includes a mobile application (iOS or Android), testing will need to be coordinated with Signifyd during implementation.

1. Install the JavaScript snippet

Place the following script just before the closing </head> tag on all public facing pages. The script loads asynchronously and does not affect page load time.

We recommend that you load the script on all public user-facing pages. If you are unable to load the script on all pages make sure to have loaded the script at least once before the checkout process is complete.

<script
  defer
  type="text/javascript"
  id="sig-api"
  data-order-session-id="YOUR-SESSION-ID-HERE"
  src="https://cdn-scripts.signifyd.com/api/script-tag.js"
></script>

2. Provide a unique session id

Replace data-order-session-id with a unique session id for the current user's checkout.

The session id must formatted as followed:

  • Less than 128 characters long
  • Upper and lowercase English letters (a-z, A-Z)
  • Digits (0-9)
  • Underscore (_)
  • Hyphen (-)

3. Send the session id on case creation

After an order is created on your website you will need to add the value you used for data-order-session-id to the body of the API POST request to, https://api.signifiyd.com/v2/cases under the purchase object:

{
    "purchase": {
        "orderSessionId": "YOUR-SESSION-ID-HERE",
        "browserIpAddress": "192.168.1.1",
        "orderId": "19418",
        "createdAt": "2016-07-11T17:54:31-05:00",
        "paymentGateway": "stripe",
        "paymentMethod": "credit_card",
        "transactionId": "1a2sf3f44f21s1",
        "currency": "USD",
       …
    }
}

View the Create Case docs for additional information on creating cases.

Testing / Debugging

Testing the Signifyd device profiling script

During testing you may want to confirm that the Signifyd device profiling script is working correctly. To do so you can may open the dev tools on your browser and check that sigScriptLoader.isInitialized is set to true.

Listening for error events

When an issue occurs within the Signifyd device profiling script, an error message is displayed in the browser's developer console tab. You may also want the ability to be aware of this within your application or perform an action when an error happens.

The Signifyd device profiling script dispatches an event whenever an error occurs that can be received by the invoking application. The event type is sigScriptError and this can be listened for via an event listener to handle the outcome of an error being raised.

Below is an example of listening for the error event:

<script>
  document.addEventListener('sigScriptError', function (error) {
    // Logic that happens whenever error occurs within Signifyd device profiling script
    // Details of error can be found in error.detail
    console.log('Error details: ', error.detail)
  })
</script>