Generate URL API

Call this API to generate an Non-Document Verification H5 Frontend link.

Request Example:

curl -X POST \
  https://sg-api.advance.ai/intl/openapi/identity-risk/idvs-h5/ekyc/v1/generate-non-document-verification-url \
  -H 'Content-Type: application/json' \
  -H 'X-ACCESS-TOKEN:{Your Access Token}' \
  -d '{
    "returnUrl": "https://www.example.com",
    "failReturnUrl":"https://www.example.com/fail",
    "callbackUrl": "https://www.example.com/callback",
    "bizId": "7ac66c0f148de9519b8bd264312c4d64", 
    "userId":"8e44f0089b076e18a718eb9ca3d94674",
    "region":"NGA",
    "numberType": "BVN",
    "language": "en-US",
    "prefersColorScheme":"light",
    "ignoreFailWhenJump": false,
    "bizCode":"WhiteCard",
    "numberValue":"22841958472"
}'

Request Url

https://sg-api.advance.ai/intl/openapi/identity-risk/idvs-h5/ekyc/v1/generate-non-document-verification-url
POST (application/json)

Request Header Parameters

ParameterDescription
X-ACCESS-TOKENstring Please use Token Authentication API to get your access token

Request Parameters


ParameterDescription
returnUrlstring The target URL that the frontend jumps to after the user completes the verification flow. Supports standard web URLs such as https://... and custom schemes such as myapp://.... Max Length 2048 characters.
Refer to Redirect URL Requirements and Frontend Integration(H5)
failReturnUrlstring The target URL that the frontend jumps to after the user fails to complete the verification flow. Supports standard web URLs such as https://... and custom schemes such as myapp://.... Max Length 2048 characters.
Refer to Redirect URL Requirements and Frontend Integration(H5)
callbackUrlstring [Optional] The target URL to notify the caller after the Verification result is all completed (include Id forgery result). Max Length 2048 characters. callbackUrl only supports http:// and https:// URLs. Custom schemes such as myapp://... are not supported.
Refer to Redirect URL Requirements and Callback Notification
bizIdstring The unique business id to identify the business transaction that triggered this Verification processing, such as order id.
userIdstring The unique userId to identify the user who is performing the Verification.
region

string The region of the service support. Refer to

ISO ALPHA-3 Country Code

language

string [Optional] The languages currently supported by the frontend are:

en - English

fil - Filipino

ms - Malay

id - Indonesian

th - Thai

bn - Bengali

Refer to

HTTP Accept-Language


NOTE: When the user-specified language is not matched, it will fall back sequentially: language by

Generate URL API

-> language by User browser > Default language (en).

prefersColorSchemestring [Optional ] default "light". Refer to prefersColorScheme
numberType

string The document type that requires the user to provide.
Refer to

Supported Regions & NumberTypes

bizCodestring [Optional ] The business type of the user. max size of the length is 32. only support characters a-zA-z0-9
ignoreFailWhenJump

bool [Optional] default to false.Refer to

Frontend Integration(H5)

iframeEnabled

bool [Optional] The iframeEnabled parameter controls the integration mode for the workflow. When set to true, the generated URL enables iframe embedding, allowing the workflow to be seamlessly integrated into your web application without requiring users to leave your interface. In this mode, please refer to example for implementation details.

When set to false, the system will redirect users using either the returnUrl (for successful completion) or failReturnUrl (for failed attempts) instead of iframe embedding.

numberValuestring [Optional ] Only valid when numberType is not empty. The number you want to check . eg 22841958472. Whether it is required depends on numberType — see Input fields by numberType.
fullNamestring [Optional ] Only valid when both numberType and numberValue are not empty. Required when numberType = 'NIK'. See Input fields by numberType.
genderstring [Optional ] User gender. Values: FEMALE / MALE / OTHER. For numberType = 'DNI', required when numberValue is provided. See Input fields by numberType.

prefersColorScheme

indicate the theme that AAI's Frontend should use.

Supported Valuesexplained
lightlight theme.
darkdark theme.

Response Description

ParameterDescription

code

Response Code of this Solution Transaction.

transactionId

The request id, the max length is 64

pricingStrategy

Deprecated, Always return FREE

message

Status Code Explanation

data

signatureId signatureId which can use it to get the verification result

url Get H5 URL that for user to go through the process.
Will expire in 3600 seconds.
Refer to Frontend Integration(H5)

expiredTime Expiration timestamp

extra

Extra response info (Exception Message)

Response Code

Status CodeMessage
SUCCESSOK
PARAMETER_ERRORParameter error, please check you input.
Parameter should not be empty
Invalid returnUrl, please check your returnUrl
Solution code is wrong
Prefers color scheme is wrong
Number type and country are not match
Number is invalid format
Name is invalid format
ERRORServer error

Response Examples

SUCCESS

{
    "code": "SUCCESS",
    "message": "OK",
    "data": {
        "signatureId": "ed8b21c0c87ad617",
        "url": "https://h5.advance.ai/idvs/?token=eyJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJoNV9saXZlbmVzcyIsInN1YiI6IntcImN1c3RvbWVySWRcIjozMTUwMjk4LFwiYWNjb3VudElkXCI6MzE1MDI5OSxcIl90aW1lc3RhbXBcIjoxNzA4NTA5ODk5OTI4LFwiX3V1aWRcIjpcIjFmYzEzOWExMTY1YjRjMTBiY2U4MDFkM2RkMjRhYzI4XCJ9IiwiYXVkIjoiV0VCIiwiaWF0IjoxNzA4NTA5ODk5LCJleHAiOjE3MDg1MTM0OTl9.VKpPl8fDtdhD2y6Y2VwUYOdlnJKusRrDtmfw4FY6lq2kbStk0J45VdchdEHl4oa9SZq9_b9hYBJ1KzCSegAglA&signatureId=ed8b21c0c87ad617",
        "expiredTime":1642580192430
    },
    "extra": null,
    "transactionId": "ed8b21c0c87ad617",
    "pricingStrategy": "FREE"
}

REGION_WRONG

{
    "code":"PARAMETER_ERROR",
    "message":"Number type and country are not match",
    "data":null,
    "extra":null,
    "transactionId":"0f74aeb4dd3f1d48",
    "pricingStrategy":"FREE"
}

PARAMETER_ERROR

{
    "code":"PARAMETER_ERROR",
    "message":"Parameter error,please check you input.",
    "data":null,
    "extra":null,
    "transactionId":"ba134d6112c57a4c",
    "pricingStrategy":"FREE"
}
{
    "code":"PARAMETER_ERROR",
    "message":"Parameter should not be empty",
    "data":null,
    "extra":null,
    "transactionId":"dfcdc346a81f404f",
    "pricingStrategy":"FREE"
}
{
    "code":"PARAMETER_ERROR",
    "message":"Invalid returnUrl,please check your returnUrl",
    "data":null,
    "extra":null,
    "transactionId":"876cf2a354f73725",
    "pricingStrategy":"FREE"
}

ERROR Response

{
    "code":"ERROR",
    "message":"Server error",
    "data":null,
    "extra":null,
    "transactionId":"1deae5a13ef2bd5e",
    "pricingStrategy":"FREE"
}