KycApi

This class implements BasicApi.

This is a JavaScript implementation of the KYC API.

For ease of use we recommend using the ApplicationReference object for interaction instead.

Interfaces

KycStatusResponse

interface KycStatusResponse {
    complete: boolean,
    success: boolean,
    distance: number,
    createdAt: string,
    completedAt: string,
    webhook: string|null
}

KycDetailsResponse

interface KycDetailsResponse {
    idCardPictureUrl: string,
    selfiePictureUrl: string
}

Methods

constructor(app, endpoint)

Create a KYC API object.

  • app should be an instance of the ApplicationReference object.

  • endpoint should be the Vulos Identity endpoint.

async status(kycId)

Get the status of a KYC verification instance by ID.

The result implements the KycStatusResponse interface.

This method's response has the kyc:status cache prefix.

async list(page, pageSize)

Get a list of all the KYC verification instance IDs.

  • page defaults to 0;

  • pageSize defaults to 10;

The result is an array of KYC Instance IDs.

This method's response has the kyc:list cache prefix.

async upload(selfiePicture, idCardPicture)

Upload KYC verification details for later use, both of the arguments must be objects that inherit from Blob (like File).

The result implements the KycDetailsResponse interface.

async create(selfiePicture, idCardPicture, webhook)

Make a KYC verification request, the first two arguments may be objects that inherit from Blob or URLs returned by the upload() method, the webhook argument is optional.

The result is the ID of the KYC Instance that was created.

Last updated