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"
}Generate a hosted KYC link to onboard a customer
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"
}API token authentication using format <api token id>:<api client secret>
An optional uri a customer will be redirected to after completing the hosted KYC flow
The platform id of the customer to onboard
Successful operation
A hosted KYC link for your customer to complete KYC
"https://example.com/redirect"
The platform id of the customer to onboard
"019542f5-b3e7-1d02-0000-000000000001"
The customer id of the newly created customer on the system
"Customer:019542f5-b3e7-1d02-0000-000000000001"
Was this page helpful?