my.call('openOUI')
Specification
The following table is a specification of this JSAPI:
JSAPI Name |
|
Description | This JSAPI is used as jsBridge to open OUI form |
Request
The following part describe about parameter of request in this JSAPI:
Request Parameter
The following table is a request parameter in this JSAPI:
Name | Type | Required | Condition | Remarks |
needKYC | Boolean | Mandatory | - | Flag to indicate the need for user KYC info. Set to be |
needOmniUserInfo | Boolean | Mandatory | - | Flag to indicate the need for user omni info. Set to be |
signature | JSON Object | Mandatory | - | Consist of two main components:
|
Request Sample
The following part will be described samples of request in this JSAPI.
Request Sample for Required Omni User Info and KYC Info
The following script is a sample request for required user omni info and KYC info:
my.call('openOUI', {
{
info: {
"needKYC": true,
"needOmniUserInfo": true,
"signature": {
"hash": "signature hash",
"payload": "{"clientId":"2025081517392601023617","platform":"MINI_PROGRAM","requestTimestamp":"2020-06-09T23:24:26+07:00"}"
}
}
},
callback: (res) => {
// you can process result here
}
});Request Sample for Required Omni User Info
The following script is a sample request for required user omni info:
my.call('openOUI', {
{
info: {
"needKYC": false,
"needOmniUserInfo": true,
"signature": {
"hash": "signature hash",
"payload": "{"clientId":"2025081517392601023617","platform":"MINI_PROGRAM","requestTimestamp":"2020-06-09T23:24:26+07:00"}"
}
}
},
callback: (res) => {
// you can process result here
}
});Request Sample for Required KYC Info
The following script is a sample request for required KYC info:
my.call('openOUI', {
{
info: {
"needKYC": true,
"needOmniUserInfo": false,
"signature": {
"hash": "signature hash",
"payload": "{"clientId":"2025081517392601023617","platform":"MINI_PROGRAM","requestTimestamp":"2020-06-09T23:24:26+07:00"}"
}
}
},
callback: (res) => {
// you can process result here
}
});Response
The following part describe about parameter of response in this JSAPI:
Response Parameter
The following table is a response parameter in this JSAPI:
Name | Type | Required | Condition | Remarks |
success | Boolean | Mandatory | - | Callback function upon call success |
errorCode | String | Conditional | Y:= success is | Refer to error code list |
errorMessage | String | Conditional | Y:= success is | Refer to error message list |
Response Sample
The following part will be described samples of response in this JSAPI.
Success
The following script is a response sample of this JSAPI for success scenario:
{
"success": true
}Failed
The following script is a response sample of this JSAPI for failed scenario:
{
"success": false,
"errorCode": "OMNI001",
"errorMessage": "Data Request Incomplete"
}Error Code Information
The following table shows the error codes and messages used in this JSAPI:
No. | Error Code | Error Message |
OMNI001 | Data Request Incomplete | |
OMNI002 | User Cancel Process | |
OMNI003 | Something went wrong in this process. Please try again. |
