API Explanation

Request Type

POST

Request URI

/api/v1/auth/token

Request

Parameter Type Required Description
appId String Yes The appId that generated by OTT Pay for onboarded merchant to access payment API. This used together with appKey.
appKey String Yes The appKey that generated by OTT Pay for onboarded merchant to access payment API. This used together with appId.

Request Example:

{
  "appId": "ON00000185",
  "appKey": "0e83678f102d188d8875e8e4c781b984"
}

Response

Parameter Type Description
token String Bearer Token for Authorization
expired Number Bearer Token expiration time. Unix timestamp expressed in milliseconds

Response Example:

{
    "status": "SUCCESS",
    "result": {
        "token": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJPTjAwMDAwMTg1Mjc5NyIsImF1ZGllbmNlIjpudWxsLCJyb2xlIjpudWxsLCJjcmVhdGVkIjoxNjc3Njg4MDM0MjkxLCJ1c2VydHlwZSI6IkNVU1RPTUVSIiwiZXhwIjoxNjc3Njg4OTM0LCJ1c2VyaWQiOjI3OTd9.wALCr1X1TuRV3i-bvL4x-31CoFhf1sjXyL4AhWHNghivSWmGbX_C9t9mdmAdziYDSEvZt9ZTKiWPM-ccIcm60A",
        "expired": 1677688934293
    }
}

API Response error code

code message description
10003 API Authorization failed The merchant appId and appKey pair you provided cannot be found.
10005 Invalid parameter Parameter format incorrect
20004 Database error Transaction data induced database error.