my.call('openOUI')

Specification

The following table is a specification of this JSAPI:

JSAPI Name

my.call('openOUI')

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 true  if user KYC info is required

needOmniUserInfo

Boolean

Mandatory

-

Flag to indicate the need for user omni info. Set to be true  if user omni info is required

signature

JSON Object

Mandatory

-

Consist of two main components:

  1. hash: Hash value from generate signature step
  2. payload: Signature payload which contains:
    • clientId: Mini Program client identifier
    • platform: Merchant platform identifier for Mini Program
    • requestTimestamp: Transaction date time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)

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:

copy
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:

copy
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:

copy
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 false

Refer to error code list

errorMessage

String

Conditional

Y:= success is false

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:

copy
{
    "success": true
}

Failed

The following script is a response sample of this JSAPI for failed scenario:

copy
{
    "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.