KYC Match Reference
The KYC Match client is scoped to a single user, so in order to interact with the KYC Match service, you need to create a KycMatchUserClient
instance for the user you want to verify.
KycMatchUserClient
s are created using the KycMatchClient
accessible from the GlideClient
instance.
KycMatchClient Reference
Methods
1. forUser
Description:
forUser
creates a KycMatchUserClient
instance for the specified user.
Syntax:
forUser(identifier: UserIdentifier): Promise<KycMatchUserClient>;
Parameters:
Parameter | Type | Description |
---|---|---|
identifier | UserIdentifier | An object representing a user (can be a phone number, ip address or custom user id) |
UserIdentifier Properties:
Property | Type | Description |
---|---|---|
phoneNumber | string | The phone number of the user |
ipAddress | string | The IP address of the user |
userId | string | A custom user identifier |
Only one of the properties should be provided.
Returns:
KycMatchUserClient
: A client instance for the specified user.
Example:
import { GlideClient } from "glide-sdk";
async function main() {
const glide = new GlideClient({
clientId: "your-client-id",
clientSecret: "your-client-secret",
});
const kycMatchUserClient = await glide.kycMatch.forUser({
phoneNumber: '+555123456789'
});
}
main().catch(console.error);
KycMatchUserClient Reference
The KycMatchUserClient
is used to interact with the KYC Match service for a specific user.
Methods
1. match
Description:
match
verifies if the provided KYC data matches with the user's information.
Syntax:
match(matchData: KycMatchData): Promise<KycMatchResponse>;
Parameters:
Parameter | Type | Description |
---|---|---|
matchData | KycMatchData | An object containing the KYC data to match |
KycMatchData Properties:
Property | Type | Description |
---|---|---|
idDocument | string | The ID document number |
name | string | Full name |
givenName | string | Given name |
familyName | string | Family name |
nameKanaHankaku | string | Name in Kana Hankaku |
nameKanaZenkaku | string | Name in Kana Zenkaku |
middleNames | string | Middle names |
familyNameAtBirth | string | Family name at birth |
address | string | Full address |
streetName | string | Street name |
streetNumber | number | Street number |
postalCode | number | Postal code |
region | string | Region |
locality | string | Locality |
country | string | Country |
houseNumberExtension | string | House number extension |
birthdate | string | Birthdate in ISO format (YYYY-MM-DD) |
email | string | Email address |
gender | string | Gender |
Returns:
KycMatchResponse
: An object containing the match results.
KycMatchResponse Properties:
Property | Type | Description |
---|---|---|
idDocumentMatch | string | Whether the ID document matches |
nameMatch | string | Whether the name matches |
givenNameMatch | string | Whether the given name matches |
familyNameMatch | string | Whether the family name matches |
nameKanaHankakuMatch | string | Whether the Kana Hankaku name matches |
nameKanaZenkakuMatch | string | Whether the Kana Zenkaku name matches |
middleNamesMatch | string | Whether the middle names match |
familyNameAtBirthMatch | string | Whether the family name at birth matches |
addressMatch | string | Whether the address matches |
streetNameMatch | string | Whether the street name matches |
streetNumberMatch | string | Whether the street number matches |
postalCodeMatch | string | Whether the postal code matches |
regionMatch | string | Whether the region matches |
localityMatch | string | Whether the locality matches |
countryMatch | string | Whether the country matches |
houseNumberExtensionMatch | string | Whether the house number extension matches |
birthdateMatch | string | Whether the birthdate matches |
emailMatch | string | Whether the email matches |
genderMatch | string | Whether the gender matches |
Each match property can have one of these values: "true"
, "false"
, or "not_available"
.
Example:
import { GlideClient } from "glide-sdk";
async function main() {
const glide = new GlideClient();
const kycMatchUserClient = await glide.kycMatch.forUser({
phoneNumber: '+555123456789'
});
const matchData = {
idDocument: '66666666q',
name: 'Federica Sanchez Arjona',
// ... other fields
};
const matchResult = await kycMatchUserClient.match(matchData);
console.log(matchResult);
// Output: { idDocumentMatch: "true", nameMatch: "true", ... }
}
main().catch(console.error);