Check RegKey API

Overview

An API to check issued RegKey status

send

send(checkRegKeyRequestConfig)

Returns Promise<ApiResponse<CheckRegKeyResponseBody>>

Request Config

export type CheckRegKeyRequestParams = {
  /**
   * Whether credit cards issued with RegKey have authorized minimum amount
   * - True : Through LINE Pay verification and authentication of minimum amount of credit card, check the status of RegKey. It requires review from the LINE Pay manager.
   * - False : Check the RegKey status with LINE Pay verification.
   */
  creditCardAuth?: boolean
}

export type CheckRegKeyRequestConfig = GeneralRequestConfig & {
  /**
   * A key used for automatic payment
   */
  regKey: string
  /**
   * Request parameters of check regKey API
   */
  params?: CheckRegKeyRequestParams
}

Response Body

export type CheckRegKeyResponseBody = GeneralResponseBody

Return Code

Success

CodeDescription
0000Success

Error

CodeDescription
1101A purchaser status error
1102A purchaser status error
1104Nonexistent merchant
1105The merchant can't use LINE Pay.
1106Header information error
1141Account status error
1154Unavailable preapproved payment account
1190The regKey doesn't exist.
1193The regKey has expired.

Example

Request

const res = await linePayClient.checkRegKey
  .send({
    regKey: 'RK9A2BA1942EQTO',
    params: {}
  })

Response

{
  "body": {
    "returnCode": "0000",
    "returnMessage": "Success."
  },
  "comments": {}
}

addHandler

addHandler(handler)

Returns CheckRegKeyClient

Example:

client.addHandler(({ type, req, next, httpClient }) => {
  console.log(type) // checkRegKey
  return next(req)
})

addHandlers

addHandlers(...handlers)

Returns CheckRegKeyClient

Example:

client.addHandlers(
  ({ req, next }) => next(req),
  ({ req, next }) => next(req),
  ({ req, next }) => next(req)
)
Last Updated:
Contributors: Sean Lin, Po-Wei Chen, Sean Lin