Docs
API referenceComplianceSupportHomeLog inSign up
  • Introduction
  • Guides
    • API Quick Guide
      • Perform AML Screening
      • Perform Document Check
      • Perform Identity Check
      • Perform Proof of Address Check
      • Perform Multi-Bureau Check
    • Web Portal Quick Guide
      • Perform AML Screening
      • Perform Document Check
      • Perform Multi-Bureau Check
      • Send verification link to client
    • Web SDK Guide
      • Web SDK integration guide
      • Web SDK customizations
    • Mobile SDK Guide
      • Mobile SDK integration guide
      • Mobile SDK stages
      • Mobile SDK tracked events
      • Mobile SDK error codes
    • Hosted Solution Guide
      • Integration guide
    • Postman Guide
    • Webhooks Guide
    • Integration Checklist
  • Check Types
    • AML Screening Check
      • Lists coverage
    • Document Check
      • ID coverage
      • RFID authentication
      • Redaction
      • Expected sides per type
    • Identity Check
    • Enhanced Identity Check
    • Proof of Address Check
    • Multi-Bureau Check
      • Service coverage
    • Face Authentication Check
    • Age Estimation Check
    • Automation
  • Other Services
    • AML Risk Profile
    • Bulk Processing
    • Autofill
    • Company Search
    • Address Search
    • Custom Lists
    • Advanced Case Management
  • Access Management
    • Teams and User Roles
    • Single Sign On (SSO)
      • SSO with Okta
      • SSO with Microsoft Entra ID
  • Useful Resources
    • Testing Data
  • API Reference
Powered by GitBook
On this page
  • Overview of flow
  • Integration Steps
  • Create Client
  • Generate session
  • Redirect the client to the URL
  • Customized branding

Was this helpful?

  1. Guides
  2. Hosted Solution Guide

Integration guide

PreviousHosted Solution GuideNextPostman Guide

Last updated 1 year ago

Was this helpful?

Overview of flow

Integration Steps

Create Client

A client represents the individual for whom you need to perform various KYC checks. A client is required to generate a flow session. This must be done in your backend server.

Example request

curl -X POST https://api.complycube.com/v1/clients \
     -H 'Authorization: <YOUR_API_KEY>' \
     -H 'Content-Type: application/json' \
     -d '{
          "type": "person",
          "email": "john.doe@example.com",
          "personDetails":{
               "firstName": "John",
               "lastName" :"Doe"
          }
        }'
const { ComplyCube } = require("@complycube/api");

const complycube = new ComplyCube({ apiKey: "<YOUR_API_KEY>" });

const client = await complycube.client.create({
  type: "person",
  email: "john.doe@example.com",
  personDetails: {
    firstName: "John",
    lastName: "Doe"
  }
});
from complycube import ComplyCubeClient
cc_api = ComplyCubeClient(api_key='<YOUR_API_KEY>')

new_client = {
    'type':'person',
    'email':'john.doe@example.com',
    'personDetails': {
        'firstName':'John',
        'lastName':'Doe'
    }
}

client = cc_api.clients.create(**new_client)
use ComplyCube\ComplyCubeClient;

$ccapi = new ComplyCubeClient('<YOUR_API_KEY>');

$result = $ccapi->clients()->create([
    'type' => 'person',
    'email' => 'john.doe@example.com',
    'personDetails' => [
        'firstName' => 'John',
        'lastName' => 'Doe'
    ]
]);
using ComplyCube.Net;
using ComplyCube.Net.Resources.Clients;

var clientApi = new ClientApi(new ComplyCubeClient("<YOUR_API_KEY>"));
var newClient = new ClientRequest {
  type = "person",
  email = "john.doe@example.com",
  personDetails = new PersonDetails {
    firstName = "John",
    lastName = "Doe"
  }
}

var client = await clientApi.CreateAsync(newClient);

Example response

The response will contain an id (the Client ID). It is required for the next step.

{
    "id": "5eb04fcd0f3e360008035eb1",
    "type": "person",
    "email": "john.doe@example.com",
    "personDetails": {
        "firstName": "John",
        "lastName": "Doe",
    },
    "createdAt": "2020-01-04T17:24:29.146Z",
    "updatedAt": "2020-01-04T17:24:29.146Z"
}

Generate session

A session is a unique ComplyCube URL address to redirect your clients to complete identity verification. Once complete, your clients will be redirected to your chosen URL.

Example request

curl -X POST https://api.complycube.com/v1/flow/sessions \
     -H 'Authorization: <YOUR_API_KEY>' \
     -H 'Content-Type: application/json' \
     -d '{
          "clientId":"CLIENT_ID",
          "checkTypes": ["extensive_screening_check", "identity_check", "document_check"],
          "successUrl": "https://www.yoursite.com/success",
          "cancelUrl": "https://www.yoursite.com/cancel"
        }'
const { ComplyCube } = require("@complycube/api");

const complycube = new ComplyCube({ apiKey: "<YOUR_API_KEY>" });

const session = await complycube.flow.createSession("CLIENT_ID", {
    checkTypes: [
      "extensive_screening_check",
      "identity_check",
      "document_check"
    ],
    successUrl: "https://www.yoursite.com/success",
    cancelUrl: "https://www.yoursite.com/cancel",
    theme: "light"
});
from complycube import ComplyCubeClient
cc_api = ComplyCubeClient(api_key='<YOUR_API_KEY>')

flow_session = {
    'clientId': client.id,
    'checkTypes':[
        'extensive_screening_check',
        'identity_check',
        'document_check'
    ],
    'successUrl':'https://wwww.yoursite.com/success',
    'cancelUrl':'https://wwww.yoursite.com/cancel',
    'theme': 'light'
}

session = cc_api.flow.create(**flow_session)
use ComplyCube\ComplyCubeClient;

$ccapi = new ComplyCubeClient('<YOUR_API_KEY>');
$session = $ccapi->flow()->createSession([
    'clientId' => $clientId,
    'checkTypes' => [
        'extensive_screening_check',
        'identity_check',
        'document_check'
    ],
    'successUrl' => 'https://www.yoursite.com/success',
    'cancelUrl' => 'https://www.yoursite.com/cancel',
    'theme' => 'light'
]);
using ComplyCube.Net;
using ComplyCube.Net.Resources.FlowSessions;

var fSession = new FlowSessionApi(new ComplyCubeClient("<YOUR_API_KEY>"));

var flowSession = new FlowSessionRequest {
  clientId = aClient.id,
  checkTypes = new string[] {
    "extensive_screening_check",
    "identity_check",
    "document_check"
  },
  successUrl = "http://complycube.com",
  cancelUrl = "http://complycube.com"
};

var result = fSession.CreateAsync(flowSession).Result;

Example response

{
    "redirectUrl": "https://flow.complycube.com/test_ODdkNjhiOTU0MzY4YmE5NjRmMDMyY2E5MWYwZjgxNjMzZTcyMWJmNzU2YjZmNDQ4NmFjMTU0ZGZhYTU5MmNhY2NiNjI3ZDE4YWJkYmU2M2M3ZWYzZTlmM2M3MzgxMmM3NzZhMjVlYmQyNDI0ODdkOWQ3M2JiMjkxZTYxNzdhYmExMGEzOGRhYmM2OTIwMjgyYmEzZGY3ZDY0NWZhMjcwN2RlMTFkOTcxZWNhOWI2Zjg0NjllZGNkODVjYzMzMDA5YjdlMWY5OGIwMmZjY2UzNGI2YTMxOGQxNGZmNGFhYjczNzU0YmYwMjFkMzU1M2FjMjQ4ZDQ2ZjJjZTY4YWY0MzIxNjVlMDRjOTIyYTExMTlmMWU3YTYwMDY1NGJmYWM0NTA2MDE5NTg5NTkxYzA4MzYyYTUyM2I0NDM4OGExNWIyMTIzYTBhNDc0NDA4NWM2ZTQwMmNjMGVjMTk2YW?theme=light"
}

Redirect the client to the URL

Redirect your client to the redirectUrl generated in the previous step.

Once the client has provided all their details on the hosted solution:

  1. ComplyCube will perform all the checks you opted for when creating the session (as part of checkTypes).

  2. The client will be redirected back to the specified successUrl.

Customized branding

.

You can retrieve the outcomes and breakdown of the checks via the API or Web Portal. If you have , a notification will be sent upon completing each check.

You can customize the color accents and add your logos to our hosted page through your (when available on your plan).

To learn more about our Session endpoint
set up webhooks
brand settings
Flow integration guide (hosted solution)