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
Code | Description |
---|---|
0000 | Success |
Error
Code | Description |
---|---|
1104 | Non-existing merchant |
1105 | The merchant cannot use the LINE Pay. |
1106 | A header information error |
1190 | The regKey does not exist |
1193 | The 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)
)