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
Code | Description |
---|---|
0000 | Success |
Error
Code | Description |
---|---|
1101 | A purchaser status error |
1102 | A purchaser status error |
1104 | Nonexistent merchant |
1105 | The merchant can't use LINE Pay. |
1106 | Header information error |
1141 | Account status error |
1154 | Unavailable preapproved payment account |
1190 | The regKey doesn't exist. |
1193 | The 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)
)