/request_kyc
Starts KYC verification process on a registered user_handle. This call triggers to KYC application to be sent.
After having created an entity with /register, you can start the KYC verification process on the user with this endpoint. The verification results for a handle are asynchronously returned at the /check_kyc endpoint (do NOT poll), and further details on handling failures can be found in the documentation there.
Classic KYC ONLY
Only use this endpoint if you are utilizing Classic KYC (not Advanced). If you are using Advanced KYC, use /kyc.
Request
The request body at this endpoint is the header_msg JSON object.
KYC/KYB Levels
KYC
For individual entities, please use the below for the kyc_level
value:
KYC-STANDARD
- this level contains full KYC and allows documents to be used to verify information that could not be verified automatically.
KYB
Unlike with KYC, with KYB the kyc_level does not need to be specified explicitly by your API request. Instead, KYB levels are applied to the business entity based on the business type.
KYB-STANDARD
- Depending on the business type, various individuals holding key roles within the business (i.e., Controlling Officer, Beneficial Owner) are required to pass individual KYC. This must be certified by an Administrator of the business. See details here - https://docs.silamoney.com/docs/kyb-know-your-business
Authorization / Authentication
Apps using Access Token Authorization
Use a valid access token in a Authorization: Bearer request header.
See Auth Token Overview for more details.
Apps using ECDSA Authentication
Both authsignature and usersignature headers are required for this request. The usersignature header should be generated with a keypair registered to the user (either registered from the /register endpoint or the /register_wallet endpoint).
See our ECDSA overview for more.
POST /0.2/request_kyc HTTP/1.1
sandbox.silamoney.com
Content-Type: application/json
// if using OAuth2
Authorization: Bearer [GENERATED JWT TOKEN HERE]
// if using ECDSA
authsignature: [GENERATED AUTHSIGNATURE HEX STRING HERE]
usersignature: [GENERATED USERSIGNATURE HEX STRING HERE]
{
"header": {
"created": 1234567890,
"app_handle": "app_handle", //required
"user_handle":"user_handle", //required
"version": "0.2",
"reference": "<your unique id>"
},
"message": "header_msg",
"kyc_level": "KYC-STANDARD" //optional, leave out for KYB
}
***
HTTP/1.1 200 OK
{
"reference": "<your unique id>",
"sila_reference_id": "sila_assigned_id",
"message": "user submitted for KYC review.",
"success": true,
"status": "SUCCESS",
"response_time_ms": "171",
"verification_uuid": "482d405f-2dc4-4cbc-9f37-13e0dfa8be5a"
}
// Normal flow - NOTE**, use 'KYC-STANDARD'. This will result in a `DOCUMENTS REQUIRED`
// verification status in /check_kyc may pass KYC by uploading a document.
const res = await Sila.requestKYC(userHandle, walletPrivateKey, 'KYC-STANDARD');
// Custom flow
const res = await Sila.requestKYC(userHandle, walletPrivateKey, 'flow_name');
// Success Response Object
console.log(res.statusCode); // 200
console.log(res.data.reference); // Random reference number
console.log(res.data.status); // SUCCESS
console.log(res.data.message); // User submitted for KYC review
console.log(res.data.success);
console.log(res.data.verification_uuid);
### Normal flow - NOTE**, use 'KYC-STANDARD'. This will result in a `DOCUMENTS REQUIRED`
### verification status in /check_kyc may pass KYC by uploading a document.
payload = {
"user_handle": "user.silamoney.eth", #Required
"kyc_level": "KYC-STANDARD"
}
User.requestKyc(silaApp,payload,user_private_key, use_kyc_level=True)
### Custom KYC Request
payload = {
"user_handle": "user.silamoney.eth", #Required
"kyc_level": "CUSTOM_KYC_FLOW_NAME" // pre-approval required
}
User.requestKyc(silaApp,payload,user_private_key, use_kyc_level=True)
### Success Response Object
{
status_code: 200,
reference: 'ref',
success: True,
verification_uuid: '482d405f-2dc4-4cbc-9f37-13e0dfa8be5a',
status: 'SUCCESS',
message: 'user submitted for kyc',
}
### Failure Response Object
{
status: 'FAILURE',
message: 'error',
}
### ***SECURITY ALERT***
### ***This sdk never transmits private keys over the network,it is advised to use a secure way for managing user private keys***
// Normal flow - NOTE**, use 'KYC-STANDARD'. This will result in a `DOCUMENTS REQUIRED`
// verification status in /check_kyc may pass KYC by uploading a document.
ApiResponse response = api.requestKYC("user handle","KYC-STANDARD","user private key");
//Custom kyc flow
ApiResponse response = api.requestKYC("user handle","custom kyc flow name","user private key");
RequestKycResponse parsedResponse = (RequestKycResponse) response.getData();
parsedResponse.getStatus();
parsedResponse.getMessage();
parsedResponse.getReference();
parsedResponse.getVerificationUuid();
parsedResponse.getSuccess();
// Normal flow - NOTE**, use 'KYC-STANDARD'. This will result in a `DOCUMENTS REQUIRED`
// verification status in /check_kyc may pass KYC by uploading a document.
$userHandle = 'user.silamoney.eth';
$userPrivateKey = 'some private key'; // Hex format
$kycLevel = 'KYC-STANDARD';
$response = $client->requestKYC($userHandle, $userPrivateKey, $kycLevel);
// Custom flow
$userHandle = 'user.silamoney.eth';
$userPrivateKey = 'some private key'; // Hex format
$kycLevel = 'CUSTOM_KYC_FLOW_NAME';
$response = $client->requestKYC($userHandle, $userPrivateKey, $kycLevel);
// Success 200
echo $response->getStatusCode(); // 200
echo $response->getData()->reference; // Random reference number
echo $response->getData()->status; // SUCCESS
echo $response->getData()->message; // User submitted for KYC review.
echo $response->getData()->success;
echo $response->getData()->verification_uuid;
ApiResponse<object> response = api.RequestKYC(userHandle, walletPrivateKey, "KYC-STANDARD");
// Custom flow
ApiResponse<object> response = api.RequestKYC(userHandle, walletPrivateKey, "flow_name");
// Success Response Object
Console.WriteLine(response.StatusCode); // 200
Console.WriteLine(((RequestKycResponse)response.Data).Reference); // Random reference number
Console.WriteLine(((RequestKycResponse)response.Data).Status); // SUCCESS
Console.WriteLine(((RequestKycResponse)response.Data).Message); // user submitted for KYC review.
Console.WriteLine(((RequestKycResponse)response.Data).VerificationUuid); // verification uuid.
Request Attributes
Key | Type | Description |
---|---|---|
header | JSON object | Required. Required keys: created - Unix epoch timestamp in seconds. Must not be future-dated and must not be dated more than 5 minutes in the past.app_handle - your app handleuser_handle - the user_handle the KYC verification is being requested forOptional keys: reference : Can be any string value for your own reference. If not provided, one will be assigned.version : Cannot be null if key is present. Valid values: 0.2, v0.2, V0.2 |
kyc_level | String | Optional. Do NOT include for KYB - KYB levels are applied to the business entity automatically based on the business type. Use to request a specific verification flow for an entity. If left empty, KYC-STANDARD will be used.KYC-STANDARD will provide a DOCUMENTS REQUIRED status in /check_kyc for entities that don't automatically pass, but that could pass KYC by uploading a document.See our section on KYC/KYB Levels for more details on KYC levels. |
Responses
Status Code | Success Attribute | Description |
---|---|---|
200 | true | The verification process for the user registered under user_handle has been successfully started. |
400 | false | Bad request format - check validation_details for more information. |
401 | false | authsignature or usersignature header was absent or incorrect. |
403 | false | kyc_level not configured/approved for app_handle in current environment. |
403 | false | Entity identity has returns for previous entity. |
Mocking KYC Failures in Sandbox
In the Sandbox environment ONLY you can provide triggers to /register to test out KYC failures. For Classic KYC, you can find those here.
Updating End User Data
Prior to requesting KYC, you can use the /update/ endpoint to update any end user PII.
If an end user needs to update their PII after passing KYC, you must call /request_KYC on that entity again after the data has been updated. Exceptions to this rule are updating email or phone number.
IMPORTANT
Not all end user data can be updated while verification is pending or after verification has passed. Please see the /update/ doc linked above for specifics.
Number of KYC attempts allowed
End users get two total attempts to pass KYC or KYB, regardless if Advanced KYC or Classic is used.
Updated 2 months ago