Expire RegKey API

Overview

An API to expire issued RegKey

send

send(expireRegKeyRequestConfig)

Returns Promise<ApiResponse<ExpireRegKeyResponseBody>>

Request Config

export type ExpireRegKeyRequestBody = EmptyObject

export type ExpireRegKeyRequestConfig = GeneralRequestConfig & {
  /**
   * A key used for automatic payment
   */
  regKey: string
  /**
   * Request body of expireRegKey API
   */
  body?: ExpireRegKeyRequestBody
}

Response Body

export type ExpireRegKeyResponseBody = GeneralResponseBody

Return Code

Success

CodeDescription
0000Success

Error

CodeDescription
1104Non-existing merchant
1105The merchant cannot use the LINE Pay.
1106A header information error
1190The regKey does not exist
1193The regKey has been expired

Example

Request

const res = await linePayClient.expireRegKey.send({
  regKey: 'RK9D2BA19XTFQWC'
})

Response

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

addHandler

addHandler(handler)

Returns ExpireRegKeyClient

Example:

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

addHandlers

addHandlers(...handlers)

Returns ExpireRegKeyClient

Example:

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