SDK Response
The HyperKYC SDKs return five distinct status values for all transactions, each representing a different outcome of the workflow execution. They are:
The detailed response format for each status:
auto_approved / needs_review / auto_declined
When the workflow completes successfully (approved, declined, or requires manual review), the SDK returns:
{
"TransactionID": "<Transaction_ID>",
"status": "auto_approved/auto_declined/needs_review",
// details will be sent if the workflow has sdkResponse
"details": {
"fullName": "<Full_Name>",
"countrySelected": "ind",
"dateOfBirth": "<Date_of_Birth>",
"dateOfIssue": "<Date_of_Issue>",
"selfieImage": "",
"idFrontImage": "",
"idBackImage": ""
}
}
When exitOnEndStates is enabled in the workflow, the following response structure is returned if a user attempts to resume a transaction that has already reached a final state:
{
"TransactionID": "<Transaction_ID>",
"status": "auto_approved/auto_declined/needs_review",
"details": {},
"transactionAlreadyProcessed": true
}
error
When an error occurs during workflow execution, the SDK returns error details including the specific module where the issue occurred:
{
"TransactionID": "<Transaction_ID>",
"status": "error",
"errorMessage": "<error_message>",
"errorCode": "<error_code>",
"latestModule": "<module_id>" // module in which the error has occurred
}
user_cancelled
When a user voluntarily exits or cancels the process before completion, the SDK returns:
{
"TransactionID": "<Transaction_ID>",
"status": "user_cancelled",
"errorCode": 103,
"errorMessage": "Workflow cancelled by user",
"latestModule": "<module_id>" // module in which user closed the SDK
}
SDK Response Details
Upon workflow completion, the HyperKYC Web SDK returns a HyperKycResult object. The following table lists all the fields returned within the object, and their descriptions:
| Field | Description |
|---|---|
status | The workflow execution status (auto_approved, auto_declined, needs_review, error, user_cancelled) |
details | The requested data points from the workflow execution, created based on sdkResponse definition in the workflow configuration |
TransactionID | The transaction ID provided during SDK initialization |
errorMessage | Error description message (only returned when status is error or user_cancelled) |
errorCode | Error code (only returned when status is error or user_cancelled) |
latestModule | The last executed module before cancellation or error (only returned when status is error or user_cancelled) |
transactionAlreadyProcessed | Indicates that the end state has already been reached for the given TransactionID, as specified in exitOnEndStates within the workflow |