API Explanation

Request Type

POST

Request URI

/api/v1/auth/token

Request

ParameterTypeRequiredDescription
appIdStringYesThe appId that generated by OTT Pay for onboarded merchant to access payment API. This used together with appKey.
appKeyStringYesThe 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

ParameterTypeDescription
tokenStringBearer Token for Authorization
expiredNumberBearer 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

codemessagedescription
10003API Authorization failedThe merchant appId and appKey pair you provided cannot be found.
10005Invalid parameterParameter format incorrect
20004Database errorTransaction data induced database error.