Integration Manual
1. Creation of API Key
Log into https://onboarding.checkpointid.com
Browse to API Tokens
Click on the button 'Add token', pick an expiration date and create a new key
A key is necessary to login an API
2. Generation of POST Request to REST API
Create a request using the generated token.
Send the data of a non-resident in the body of the request. (see snippet below Request Body)
Request:
POST https://api-onboarding.checkpointid.com/api/ValidationRequests HTTP/1.1
Accept: application/json
Authorization: Bearer <YOU_TOKEN_HERE>
Content-Type: application/json
Content-Length: 106
Request body:
{
"firstName": "First Name",
"lastName": "Last Name",
"phone": "+123456789",
"email": "email@my.com",
}
Response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Server: Kestrel
Strict-Transport-Security: max-age=2592000
X-Powered-By: ASP.NET
Date: Tue, 08 Oct 2019 10:06:23 GMT
Content-Length: 101
{"requestId":"YYYYY-YYYYY-YYYYY-YYYYYYYYYY"}
Request ID is a primary Request GUID. Using it you will be able to receive the request status and validation results
3. Creation of Domain
Go to Domains
Add domain and copy generated token
A domain token is necessary for your browser to open the domain in your site. The safety policy of browsers does not allow to open iframe at third party sites without clear description of permitted domains
4. Addition of Validation Page into Iframe for Website
Insert the following code onto your page. Use requestId generated in Step 2.
Warning
A page with an invalid key will redirect to the page with an error.
In order to get the validation result from iframe it is necessary to subscribe to events. Possible results are demonstrated in the code comments.
Example of use:
<iframe id="iframe" allow="camera" src="" frameborder="0" width="100%" height="480px"></iframe>
<script>
var iframe = document.getElementById('iframe')
const REQUESTID = ‘YYYYY-YYYYY-YYYYY-YYYYYYYYYY’
const TOKEN = ‘YYYYY-YYYYY-YYYYY-YYYYYYYYYY’
const ORIGIN = 'https://onboarding.checkpointid.com'
iframe.height = window.innerHeight
// link creation for iframe. "origin" required parameter for cross policy
// Example: https://onboarding.checkpointid.com/embedded/733c5e77-b2b7-4112-9bfd-f9c0da7a603c?requestId=f3dfg7-bg45-4112-9bjg-f9g54g5hgfh
iframe.src = ORIGIN + '/embedded/' + TOKEN + '?requestId=' + REQUESTID
// event listener for accept messages of iframe
window.addEventListener('message', function (event) {
// filter by origin
if (event.origin !== ORIGIN ) return
var eventData = JSON.parse(event.data)
console.log(eventData)
})
</script>
You can find more detailed information related to the response from "iframe" in the section "API".
5. Viewing the History of Results
You can receive the result either using API or in the portal https://onboarding.checkpointid.com