new LinePay(options)
Parameters:
Name |
Type |
Description |
options |
Object
|
Properties
Name |
Type |
Attributes |
Default |
Description |
channelId |
String
|
|
|
LINE Channel Id |
channelSecret |
String
|
|
|
LINE Channel secret |
hostname |
String
|
<optional>
|
|
Hostname of LINE Pay API. Nomarlly, it is automatically set depeding on isSandbox parameter. |
isSandbox |
Boolean
|
<optional>
|
false
|
If the environemt is sandbox, set true |
sessionOptions |
Object
|
<optional>
|
|
Option object for express-session. Refer to https://github.com/expressjs/session for detail. |
|
- Source:
Methods
_lossless_converter()
Retriever for lossless_json.parse() to convert overflowed number as string.
- Source:
capture(options)
Method to capture payment
Parameters:
Name |
Type |
Description |
options |
Object
|
Object which contains parameters.
Properties
Name |
Type |
Description |
transactionId |
String
|
Transaction id returned from reserve API. *While it is described that data type should be number, javascript cannot handle the scale of transactionId so please set string for this parameter. |
amount |
Number
|
Payment amount. |
currency |
String
|
Currency following ISO2117. Supported values are USD, JPY, TWD and THB. |
|
- Source:
checkPreapprovedPay(options)
Method to check the availability of preapproved payment.
Parameters:
Name |
Type |
Description |
options |
Object
|
Object which contains parameters.
Properties
Name |
Type |
Attributes |
Default |
Description |
regKey |
String
|
|
|
Key which is returned in reserve API. |
creditCardAuth |
Boolean
|
<optional>
|
false
|
Set true to execute authorization payment in minimum amount by registered credit card. |
|
- Source:
confirm(options)
Method to confirm payment
Parameters:
Name |
Type |
Description |
options |
Object
|
Object which contains parameters.
Properties
Name |
Type |
Description |
transactionId |
String
|
Transaction id returned from reserve API. |
amount |
Number
|
Payment amount. |
currency |
String
|
Currency following ISO2117. Supported values are USD, JPY, TWD and THB. |
|
- Source:
confirmPreapprovedPay(options)
Method to confirm preapproved payment
Parameters:
Name |
Type |
Description |
options |
Object
|
Object which contains parameters.
Properties
Name |
Type |
Attributes |
Default |
Description |
regKey |
String
|
|
|
Key which is returned from reserve API. |
productName |
String
|
|
|
Product name. |
amount |
Number
|
|
|
Payment amount. |
currency |
String
|
|
|
Payment currency. |
orderId |
String
|
|
|
Order id which specified in reserve API. |
capture |
Boolean
|
<optional>
|
true
|
Set true to capture payment simultaneously. |
|
- Source:
expirePreapprovedPay(options)
Method to expire preapproved payment.
Parameters:
Name |
Type |
Description |
options |
Object
|
Object which contains parameters.
Properties
Name |
Type |
Description |
regKey |
String
|
Key which is returned by reserve API. |
|
- Source:
inquireAuthorization(options)
Method to inquire authorization.
Parameters:
Name |
Type |
Description |
options |
Object
|
Object which contains parameters.
Properties
Name |
Type |
Attributes |
Description |
transactionId |
String
|
<optional>
|
Transaction id to inquire. *While it is described that data type should be number, javascript cannot handle the scale of transactionId so please set string for this parameter. |
orderId |
String
|
<optional>
|
Order id to inquire. |
|
- Source:
inquirePayment(options)
Method to inquire payment.
Parameters:
Name |
Type |
Description |
options |
Object
|
Object which contains parameters.
Properties
Name |
Type |
Attributes |
Description |
transactionId |
String
|
<optional>
|
Transaction id to inquire. |
orderId |
String
|
<optional>
|
Order id to inquire. |
|
- Source:
middleware(options)
Middleware to start payment flow.
Parameters:
Name |
Type |
Description |
options |
Object
|
Object which contains parameters.
Properties
Name |
Type |
Attributes |
Default |
Description |
productName |
String
|
|
|
Product name. |
productImageUrl |
String
|
<optional>
|
|
URL of product image. |
amount |
Number
|
|
|
Payment amount. |
currency |
String
|
|
|
Currency following ISO4218. |
mid |
String
|
<optional>
|
|
LINE member ID. |
oneTimeKey |
String
|
<optional>
|
|
One time key. |
confirmUrl |
String
|
<optional>
|
|
URL to transition after the payment approval. Default is CURRENT_PROTOCOL://CURRENT_HOSTNAME/MIDDLEWARE_MOUNT_POINT/confirm |
confirmUrlType |
String
|
<optional>
|
"CLIENT"
|
Confirm URL type. In this middleware, supported values are CLIENT only. |
checkConfirmUrlBrowswer |
Boolean
|
<optional>
|
false
|
If check browser on transitioning to confirm URL. |
cancelUrl |
String
|
<optional>
|
|
URL to transition after cancellation of payment. |
packageName |
String
|
<optional>
|
|
String to prevent phising in Android. |
orderId |
String
|
|
|
Unique id of the order transaction. |
deliveryPlacePhone |
String
|
<optional>
|
|
Contact of payment receiver. |
payType |
String
|
<optional>
|
"NORMAL"
|
Payment type. Supported values are NORMAL and PREAPPROVED. |
langCd |
String
|
<optional>
|
|
Language to display payment pending screen. |
capture |
Boolean
|
<optional>
|
true
|
Set true if like to complete payment right after successful of confirm API call. |
|
- Source:
refund(options)
Method to refund payment
Parameters:
Name |
Type |
Description |
options |
Object
|
Object which contains parameters.
Properties
Name |
Type |
Attributes |
Description |
transactionId |
String
|
|
Transaction id to refund. |
refundAmount |
Number
|
<optional>
|
Amount to refund. |
|
- Source:
reserve(options)
Method to reserve payment
Parameters:
Name |
Type |
Description |
options |
Object
|
Object which contains parameters.
Properties
Name |
Type |
Attributes |
Default |
Description |
productName |
String
|
|
|
Product name. |
productImageUrl |
String
|
<optional>
|
|
URL of product image. |
amount |
Number
|
|
|
Payment amount. |
currency |
String
|
|
|
Currency following ISO4218. |
mid |
String
|
<optional>
|
|
LINE member ID. |
oneTimeKey |
String
|
<optional>
|
|
One time key. |
confirmUrl |
String
|
|
|
URL to transition after the payment approval. |
confirmUrlType |
String
|
<optional>
|
"CLIENT"
|
Confirm URL type. Supported values are CLIENT and SERVER. |
checkConfirmUrlBrowswer |
Boolean
|
<optional>
|
false
|
If check browser on transitioning to confirm URL. |
cancelUrl |
String
|
<optional>
|
|
URL to transition after cancellation of payment. |
packageName |
String
|
<optional>
|
|
String to prevent phising in Android. |
orderId |
String
|
|
|
Unique id of the order transaction. |
deliveryPlacePhone |
String
|
<optional>
|
|
Contact of payment receiver. |
payType |
String
|
<optional>
|
"NORMAL"
|
Payment type. Supported values are NORMAL and PREAPPROVED. |
langCd |
String
|
<optional>
|
|
Language to display payment pending screen. |
capture |
Boolean
|
<optional>
|
true
|
Set true if like to complete payment right after successful of confirm API call. |
|
- Source:
voidAuthorization(options)
Method to void authorized payment.
Parameters:
Name |
Type |
Description |
options |
Object
|
Object which contains parameters.
Properties
Name |
Type |
Description |
transactionId |
String
|
Transaction id to void. |
|
- Source: