# LINE Pay Appendix

# LINE Pay error codes

Defining error codes that may occur in the LINE Pay.

The return messages of the error codes are in English and a hyphen(-) is sent when the message is sent without a message.

Code Description
1101 Not a LINE Pay member
1102 The member is unable to proceed the transaction.
1104 The store is not one of the affiliated store.
1105 The affiliated store cannot use the LINE Pay.
1106 A header info error
1110 The credit card cannot be used
1124 Amount info error (scale)
1141 Payment account status error
1142 Low balance
1145 Payment in process
1150 Transaction history does not exist
1152 There is a history of transactions with the same transactionId.
1153 The payment amount is different than the requested amount.
1154 Unable to use the payment method set up for the automatic payment.
1155 Transaction number of a transaction type that cannot be refunded.
1159 Payment request information is not found.
1163 Unable to refund since refundable date is over.
1164 Exceeded refundable amount.
1165 A transaction already been refunded.
1169 Error on information required for payment confirmation (Must select a payment method and password authorization at the LINE Pay).
1170 Balance of the member's account has been changed.
1172 There is a record of transaction with the same order number.
1177 Exceeded maximum number of viewable transaction (Max. 100).
1178 The currency is not supported by the store.
1179 Unable to proceed the transaction.
1180 The payment is expired.
1183 The payment amount should be greater than 0.
1184 The payment amount exceeds requested amount.
1190 The regKey is unavailable.
1193 The regKey is expired.
1194 The store cannot use automatic payment.
1197 Already processing the payment with the regKey.
1198 Processing the request
1199 Internal request error
1280 A temporary error occurred while processing the credit card payment.
1281 Credit card payment error
1282 Credit card authorization error
1283 The payment was refused due to suspected fraud.
1284 The credit card payment is temporarily stopped.
1285 Missing credit card payment information
1286 Invalid credit card payment information
1287 The credit card is expired
1288 The credit card has low balance
1289 Exceeded the credit card limit
1290 Exceeded the limit of the credit card per payment
1291 The card has been reported as a stolen card.
1292 The card has been suspended.
1293 CVN input error
1294 The card is listed on the blacklist.
1295 Wrong credit card number
1296 Unable to proceed the amount
1298 The card has been declined.
2101 A parameter error
2102 JSON data format error
9000 An internal error
Contact technical support

When an internal errors such as 1199 and 9000 occur, contact the Technical Support (pay_tech@linecorp.com).

# PaymentUrl Guide

The following guide describes how to move from LINE app to app after a payment is requested from an affiliated store app.

# Android Sample

With the following sample code, you can check if the LINE app is installed and which LINE Pay versions are available. If the app is installed and versions are checked, move to the LINE Pay payment page.

Processes payment by reading MyCode provided from the LINE Pay App on the Merchant's device.


    int linePaySupportedVersion = 230;
    String paymentUrl = "..."; // This is "paymentUrl.app" URL String.
    Context context = getActivity();
    try {
        PackageManager pm = context.getPackageManager();
        PackageInfo packageInfo = pm.getPackageInfo("jp.naver.line.android", 0);
        int versionCode = packageInfo.versionCode;
        if (linePaySupportedVersion <= versionCode) {
        } else {
    } catch (NameNotFoundException e) {
    private void confirmLineInstall(Context context) {
        new AlertDialog.Builder(context)
        .setTitle("LINE Pay")
        .setPositiveButton(getString(R.String.linepay_install), new
    DialogInterface.OnClickListener() {
        public void onClick(DialogInterface dialog, int which) {
        .setNegativeButton(getString(R.String.linepay_cancel), new
    DialogInterface.OnClickListener() {
        public void onClick(DialogInterface dialog, int which) {
    private void launchUri(String uriString) {
        Uri uri = Uri.parse(uriString);
        Intent intent = new Intent(Intent.ACTION_VIEW, uri);

File: res/values/Strings.xml

<?xml version="1.0" encoding="utf-8"?>
 <String name="linepay_confirm">Supported by Android/iPhone LINE versions 4.8.0
or higher.</String>
 <String name="linepay_install">Get it now</String>
 <String name="linepay_cancel">cancel</String>

# iPhone Sample

With the following sample code, you can verify if the LINE app is installed. If the app is installed, move to the LINE Pay payment page.


NSString* lineScheme = @ "line://";
BOOL installed = [
    [UIApplication sharedApplication]
    canOpenURL : [NSURL URLWithString:lineScheme]
if (installed)
    UIAlertView *alert = [
        [UIAlertView alloc]
        initWithTitle : @ "LINE Pay" message : NSLocalizedString (@"linepay.confirm", nil)
        delegate : self cancelButtonTitle : NSLocalizedString (@"linepay.ok", nil)
        otherButtonTitles : nil
    alert.tag = 1;
    [alert show];
else {
    UIAlertView *alert = [
        [UIAlertView alloc]
        initWithTitle : @ "LINE Pay" message : NSLocalizedString (@"linepay.confirm", nil)
        delegate : self cancelButtonTitle : NSLocalizedString (@"linepay.cancel", nil)
        otherButtonTitles : NSLocalizedString (@"linepay.install",     nil),
    alert.tag = 2;
    [alert show];
- (void)
alertView : (UIAlertView*)
alertView clickedButtonAtIndex : (NSInteger)
buttonIndex {
    if (alertView.tag == 1 && buttonIndex == 0)
        NSString *paymentUrl = ...;
        // This is "paymentUrl.app" URL String.
        [self launchUrl:paymentUrl];
    else if (alertView.tag == 2 && buttonIndex == 1)
            self launchUrl : @ "itmsapps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=443904275&mt=8"
- (void)
launchUrl : (NSString*)
urlString {
    NSURL *url = [NSURL URLWithString:urlString];
    [[UIApplication sharedApplication] openURL:url];

File: en.lproj/Localized.Strings

"linepay.confirm" = "Supported by Android/iPhone LINE versions 4.8.0 or higher.";
"linepay.ok" = "OK";
"linepay.cancel" = "Cancel";
"linepay.install" = "Get it now";

# Sandbox

LINE Pay supports Sandbox environment. To run a payment test in the Sandbox environment, use an endpoint dedicated for Sandbox found from the list of API Endpoint which is provided on the integration guide. For the test, confirmUrl and Inquiry ShippingMethods API are required.

When attempting payment in the Sandbox environment, it proceeds as described as below.

Sandbox PC payment

Sandbox PC Payment

Sandbox mobile payment

Sandbox Mobile Payment


The Sandbox environment requires channel log in from both PC and mobile. However, when integrating with the real server, you're not required to access the LINE app to channel log in on mobile.

# Migration API v3

The updates in Payment API v3 are the change from API authorization to HMAC signature verification and the Request API.

# Authentication

The ID and password authentication method in Payment API v2 has been changed to HMAC authentication and message verification in v3.

Keep X-LINE-ChannelSecret that has been sent as password of v2 and use the SecretKey to generate the HMAC signature.

You can secure the signature security by designating randomly generated one-time values to X-LINE-Authorization-Nonce. See API Authentication for more details.

# HTTP request headers

Header Version 2 Version 3 Description
X-LINE-ChannelId No change
X-LINE-ChannelSecret Delete
X-LINE-MerchantDeviceProfileId No change
X-LINE-Authorization-Nonce New
X-LINE-Authorization New

# Request API

The biggest upgrade in v3 is that the API provides abundant amount of product and order information to user and also allowing convenient use of the checkout feature with the LINE user data.

productName and productImageUrl that were defined on a single product in v2 are upgraded with package[] in v3 so that better information about the product can be provided to user.

options.shipping is defined for the checkout feature. See Request API for more details.

# Request body mapping

Version 2 Version 3 Description
amount amount No change
currency currency No change
orderId orderId No change
packages[].id New
packages[].amount New
packages[].userFee New
packages[].name New
packages[].products[].id Single item -> Multiple item
productName packages[].products[].name Single item -> Multiple item
productImageUrl packages[].products[].imageUrl Single item -> Multiple item
packages[].products[].quantity New
packages[].products[].price New
packages[].products[].originalPrice New
packageName redirectUrls.appPackageName Name change
confirmUrl redirectUrls.confirmUrl
confirmUrlType redirectUrls.confirmUrlType
cancelUrl redirectUrls.cancelUrl
capture options.payment.capture
payType options.payment.payType
langCd options.display.locale Name change
checkConfirmUrlBrowser options.display.checkConfirmUrlBrowser
extras.addFriends[].type options.familyService.addFriends[].type
extras.addFriends[].ids[] options.familyService.addFriends[].ids[]
options.shipping.* New