Skip to main content
GET
/
customers
/
kyc-link
JavaScript
import LightsparkGrid from '@lightsparkdev/grid';

const client = new LightsparkGrid({
  username: process.env['GRID_CLIENT_ID'], // This is the default and can be omitted
  password: process.env['GRID_CLIENT_SECRET'], // This is the default and can be omitted
});

const response = await client.customers.getKYCLink({ platformCustomerId: 'platformCustomerId' });

console.log(response.customerId);
{
  "kycUrl": "https://example.com/redirect",
  "platformCustomerId": "019542f5-b3e7-1d02-0000-000000000001",
  "customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001"
}

Authorizations

Authorization
string
header
required

API token authentication using format <api token id>:<api client secret>

Query Parameters

redirectUri
string

An optional uri a customer will be redirected to after completing the hosted KYC flow

platformCustomerId
string
required

The platform id of the customer to onboard

Response

Successful operation

kycUrl
string

A hosted KYC link for your customer to complete KYC

Example:

"https://example.com/redirect"

platformCustomerId
string

The platform id of the customer to onboard

Example:

"019542f5-b3e7-1d02-0000-000000000001"

customerId
string

The customer id of the newly created customer on the system

Example:

"Customer:019542f5-b3e7-1d02-0000-000000000001"