Transactional
In this section, you will find how to create a Transactional process in the by Unico Integration
Getting started
Your API requests are authenticated using an access token. Any request that does not include a valid access token will return an error.
You can learn more about generating an access token here.
Endpoint to create a new Transactional process at Unico.
Defines where the user will be redirected at the end of the process. Possible values are: A URL (e.g., https://developers.unico.io/callback), a Schema URL for redirection in native mobile applications (e.g., br.com.meupacote.app://callback - the callback must be registered in your mobile app), or no redirection (just include '/').
/Flow used for Transactional processes
idtransactionalPossible values: Biometric token identification. Mandatory for the Transactional use.
7fb42bf6-2ae7-401e-a7a0-f116b8144e5dIt is a non-mandatory identifier that will be used as an indexer in the portal and you can use it as a form of association (foreign key) between your system and IDCloud.
The ID of the branch where the process will be created. If there is only one branch associated with the service account, this parameter is not required. If there is a separation of processes by branch, you will receive the branch IDs from the Unico team.
60837cd3-ed3c-4038-ad7c-0a85ad64b03aPurpose of the process.
creditprocessPossible values: Expiration time of the process in seconds from its creation. The value must be in the format "10080s", with "s" at the end. If not provided, the default value of 7 days will be used.
3600sProcess successfully created.
Invalid payload.
Access token error.
Unexpected error (internal error or parameter issue).
POST /client/v1/process HTTP/1.1
Host: api.idcloud.uat.unico.app
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 511
{
"callbackUri": "/",
"flow": "idtransactional",
"bioTokenId": "7fb42bf6-2ae7-401e-a7a0-f116b8144e5d",
"flow_config": {
"biometry_capture": {
"enabled_back_camera": true
}
},
"clientReference": "",
"companyBranchId": "60837cd3-ed3c-4038-ad7c-0a85ad64b03a",
"person": {
"duiType": "DUI_TYPE_MX_CURP",
"duiValue": "HEWW580907HGRSHL05",
"friendlyName": "Luke Skywalker",
"phone": "525536558888",
"email": "[email protected]",
"notifications": [
{
"notificationChannel": "NOTIFICATION_CHANNEL_WHATSAPP"
}
]
},
"purpose": "creditprocess",
"expiresIn": "3600s"
}{
"process": {
"id": "53060f52-f146-4c12-a234-5bb5031f6f5b",
"flow": "idtransactional",
"callbackUri": "/path/to/callback-url/",
"userRedirectUrl": "https://cadastro.dev.unico.app/process/53060f52-f146-4c12-a234-5bb5031f6f5b",
"state": "PROCESS_STATE_CREATED",
"result": "PROCESS_RESULT_UNSPECIFIED",
"createdAt": "2023-10-09T15:15:25.417105Z",
"person": {
"duiType": "DUI_TYPE_MX_CURP",
"duiValue": "HEWW580907HGRSHL05",
"friendlyName": "Luke Skywalker",
"email": "[email protected]",
"phone": "525536558888",
"notifications": [
{
"notificationChannel": "NOTIFICATION_CHANNEL_WHATSAPP"
}
],
"phoneCountryCodeAlpha3": ""
},
"purpose": "creditprocess",
"services": [],
"authenticationInfo": {
"authenticationId": ""
},
"capacities": [
[
"PROCESS_CAPACITY_IDCLOUDONE",
"PROCESS_CAPACITY_IDTOKEN"
]
],
"expiresAt": "2023-10-09T15:15:25.417105Z",
"token": "eyJhbGciOiJSUzI1[...]d_jhQ",
"companyData": {
"branchId": "60837cd3-ed3c-4038-ad7c-0a85ad64b03a",
"countryCode": "MEX"
},
"bioTokenData": {
"referenceProcessId": "7fb42bf6-2ae7-401e-a7a0-f116b8144e5d",
"authenticationId": "e545d25c-9880-4fc1-89e2-aba61be77c49"
},
"webAppToken": "eyJhbGciOiJSUzI1[...]d_jhQ"
}
}Processes must be created exclusively through backend-to-backend communication, due to our CORS policy, which prevents processes from being created through frontend-to-backend communication.
Error Responses
3
invalid flow
When the specified flow does not exist.
3
invalid person: friendly name exceeds 50 characters.
When the friendly name exceeds 50 characters.
3
invalid purpose
When the provided proposal is invalid.
3
invalid callbackUri: unable to parse callbackUri: parse "": empty url, invalid callbackUri: url:
When the provided callbackUri is invalid.
3
invalid person: email required for notification channel NOTIFICATION_CHANNEL_EMAIL, invalid email address for notification channel NOTIFICATION_CHANNEL_EMAIL
When the provided email is invalid, but there is email notification.
3
invalid person: phone number required for notification channel NOTIFICATION_CHANNEL_WHATSAPP, phone number does not contain 13 chars for notification channel NOTIFICATION_CHANNEL_WHATSAPP
When the provided phone number is invalid, but there is notification via SMS or WhatsApp.
3
idnsv2/GetPublicID request error: rpc error: code = InvalidArgument desc = invalid dui value
When the provided identifier is invalid.
3
invalid expiresIn argument
When the expirenIn is invalid.
9
XX ID Apikeys are not set
When an API Key has not been configured correctly.
No detailed error code will be provided for this situation, only the HTTP status code.
99999
Internal failure! Try again later
When there is an internal error.
Endpoint to get the result of a process in by Unico.
Process ID.
Process details retrieved successfully.
When the process ID is invalid.
Access token error.
When the process cannot be found.
Unexpected error (Internal error or parameter issue).
GET /client/v1/process/{processId} HTTP/1.1
Host: api.idcloud.uat.unico.app
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"process": {
"id": "53060f52-f146-4c12-a234-5bb5031f6f5b",
"flow": "idtransactional",
"callbackUri": "/",
"userRedirectUrl": "https://cadastro.dev.unico.app/process/53060f52-f146-4c12-a234-5bb5031f6f5b",
"state": "PROCESS_STATE_FINISHED",
"result": "PROCESS_RESULT_AUTHENTICATED",
"person": {
"duiType": "DUI_TYPE_MX_CURP",
"duiValue": "HEWW580907HGRSHL05",
"friendlyName": "Luke Skywalker",
"email": "[email protected]",
"phone": "525536558888",
"notifications": [
{
"notificationChannel": "NOTIFICATION_CHANNEL_WHATSAPP"
}
],
"phoneCountryCodeAlpha3": ""
},
"purpose": "creditprocess",
"services": [],
"authenticationInfo": {
"authenticationId": "fd433602-d496-4291-adbb-dda95a3e50b1"
},
"capacities": [
"PROCESS_CAPACITY_IDCLOUDONE",
"PROCESS_CAPACITY_IDTOKEN"
],
"expiresAt": "2023-10-09T15:15:25.417105Z",
"token": "",
"companyData": {
"branchId": "60837cd3-ed3c-4038-ad7c-0a85ad64b03a",
"countryCode": "MEX"
},
"bioTokenData": {
"referenceProcessId": "7fb42bf6-2ae7-401e-a7a0-f116b8144e5d",
"authenticationId": "e545d25c-9880-4fc1-89e2-aba61be77c49"
}
}
}3
process id is invalid
When the process ID is invalid.
No detailed error code will be provided for this situation, only the HTTP status code.
99999
Internal failure! Try again later
When there is an internal error.
Last updated