• Overview
  • Guides
  • Clearchecks Connect
  • Sandbox
  • Reference

ClearChecks Connect

ClearChecks Connect is a low-code way to integrate background screening into your application.

If you are a platform, you can have your customers create ClearChecks accounts without leaving your application. Additionally, a secure widget allows you to view and display background reports within your application. See more in the guide and use cases on best practices.


Applicant Form Widget

This widget allows your applicants to complete their application from within your application instead of redirecting applicants to a ClearChecks link in email. After you have placed an order, and have a report key, you can call this widget.

Step 1:

Pass a report_key to initiate the widget JavaScript via reportKey.

//Only include 1 script for sandbox development OR production 

//sandbox URL 
<script src='https://sandbox.clearchecks.com/js/widgets/applicant-form-widget.js'></script>  

//production URL 
<script src='https://app.clearchecks.com/js/widgets/applicant-form-widget.js'></script>  

<script>
  document.getElementById('open-widget-btn').addEventListener('click', e => {
    const applicantWidget = ClearChecksApplicantWidget.init({
      reportKey: 'REPORT KEY HERE',

      onSuccess: function(data) {
        console.log(data)
      },

      onClose: function() {
        console.log('Widget was closed')
      },

      onError: function(error) {
        console.error('An error occured', error)
      }
    });
    applicantWidget.open();
  });
</script>

Step 2:

Include a button on your page to open the report widget.

<button class="btn" id="open-widget-btn">
    Open the Applicant Form
</button>

Step 3:

The applicant form modal window will appear. Your customer will fill the form.

Step 4:

Use the onSuccess() call back function to retrieve the successful data if you want


{
  "report_key" : "...",
  "application_complete" : "1",
  "created_at": "...",
  ...
}

Finished!



View Report Widget

The report widget makes it easy to securely view an applicant's background report from within your application, without coding or formatting a JSON response from the API.

Before calling a report you must have a report_key from an existing order and optionally checked the status of the report.

Step 1:

Create a single-use JWT to retrieve a report

This widget requires account authentication using a JSON web token (JWT) to retrieve a report with the report_key stored from an order.

This call should be made from your backend with your secure api_token.

Request:


--request GET 
'https://app.clearchecks.com/api/report/{report_key}/widget-token?api_token={api_token}'
  --header 
  'Accept: application/json'

Response:


{
  "report_token" : ""
}

Step 2:

Pass single use JWT to this JavaScript snippet on your page:



// use sandbox.clearchecks.com for testing and app.clearchecks.com for production

<script src="https://sandbox.clearchecks.com/js/widgets/report.js"></script>

<script>
document.getElementById('open-widget').addEventListener('click', e => {
const token = '';
const report = window.ClearChecksReportWidget.init({ token });
          
report.open();
});
</script>

Javascript The JavaScript assigns a listener to an ElementID to invoke the widget. On this page we assigned it the open-widget element.

Finished!


Create Account Widget for Platforms

Step 1:

Request a platform source_token and private_key from your ClearChecks account manager.

Step 2:

Initiate the widget JavaScript with this snippet.

Add the sourceToken into the script


<script src="https://sandbox.clearchecks.com/js/widgets/registration-widget.js"></script>

<script>
var source_token = ;
var c = ClearChecksWidget.init({
  sourceToken: source_token,
  onSuccess(token) { console.log(token) },
  onClose() { console.log('closed') },
  onError(e) { console.log('we had an error', e) }
});
              
function ccConnect() {
  c.open()
}
</script>

Step 3:

Initialize the account creation widget

Include a button or action on your page to invoke ccConnect() function in JavaScript above.


<button class="btn-connect" onclick="ccConnect()">
  Connect to ClearChecks
</button>

The account creation modal window will appear. Your customer will be prompted to create a ClearChecks account.

Step 4:

Decrypt and store the customer api_token

Use the onSuccess() call back function to retrieve the response.

Initiate a server-side request to the token decryption endpoint.


POST api/token/decrypt HTTP 1.1
Host: app.clearchecks.com
Content-Type: application/json
Accepts: application/json

{
    "token": "",
    "private_key": ""
}

Store the customer api_token associated with your customer to use for future API methods

Note, the JavaScript alerts the window onClose() and onError() to build more functionality in your page

Finished!

ClearChecks.com