NAV Navbar
  • Introduction
  • How to Use LINE Pay APIs
  • Appendix
  • Introduction

    This chapter explains the basic concept of using LINE Pay.

    About LINE Pay

    LINE Pay is a payment system that LINE users can use on LINE Pay Merchant’s websites

    Payment process

    Figure 1 LINE Pay Payment Process

    If a merchant is registered as a LINE Pay Merchant, it can attract LINE users around the world as its customers. Also, the merchant's revenue is expected to grow when its marketing channels are expanded through LINE. For LINE Pay users to make payments using LINE Pay, the website must be registered as a LINE Pay Merchant.

    LINE Pay Merchant Registration Process

    Once a merchant is registered as a LINE Pay Merchant, an integration key and test key are issued. Merchant registration process is as follows.

    Register merchant process

    Figure 2 Merchant Registration Process

    1. Access the Registration Page (http://pay.line.me)
    2. Fill out basic information and submit required documents.
    3. Merchant registration review.
    4. Consent to fees and settlement cycles and enter identity verification PIN.
    5. Merchant registration completed.
    6. Email sent upon completion of registration.

    LINE PAY Features

    The following features are provided.

    Normal Payment

    Normal payment is a payment type where a payment is made after LINE Pay users access LINE Pay, select a payment method and enter their payment password. The payment is completed when captured. When Merchants want to separate the authorization of payment from the capture of the authorized payment, they should call "Capture API" Depending on the payment method selected when the password is confirmed, the amount of money to be paid is deducted from the buyers' balance or credit card limit.

    1. The Merchant server calls "Reserve Payment API".
    2. The buyer selects a payment method and enters the payment password on the LINE Pay payment screen.
    3. The Merchant server calls "Confirm Payment API”.
    4. The payment transaction is completed.

    Preapproved Payment

    Preapproved payment is made between Merchant server and LINE Pay server, without LINE Pay user intervention. When a LINE Pay user first makes a payment, LINE Pay issues a regKey for preapproved payment, to the Merchant, which goes through payment reservation and confirmation process, like the normal payment. Since then, the Merchant can use the issued regKey to complete following transactions by calling the Preapproved Payment API, without using the LINE app.

    1. First payment and regKey (for preapproved payment) issuance
      a.The Merchant server calls the Reserve Payment API ("payType" : "PREAPPROVED")
      b. The LINE Pay user is redirected to the confirmUrl (a parameter of the Reserve Payment API) after selecting a payment method and entering the payment password on the LINE Pay payment screen.
      c.The Merchant server calls the Confirm Payment API and saves a regKey returned as response information.
      d. The payment transaction is completed
    2. Preapproved payment
      a. The Merchant uses the regKey to call the preapproved payment API.
      b. The payment transaction is completed.
    3. Expire regKey Request to expire preapproved payment
      a. Call API to expire the regKey
      b. Expire preapproved payment

    Common Features

    1. Get Payment details
    2. Refund Request
    3. Get Authorization details
    4. Void Authorization Request

    LINE Pay Payment Status

    This chapter explains about status from payment request to payment completion.

    Pay status transition

    1. RESERVE : Calling Payment Reserve API, First Time Status
    2. AUTH : Select a Payment Method from LINE Pay app and an Authorization for a Payment Password from LINE Pay app succeeded
    3. CANCEL : Cancelling a Payment from LINE Pay app
    4. CAPTURE_WAIT : Capture Status shows Wait (When a “Capture” parameter of Reserve API is delivered as a “False”.)
    5. CAPTURE : Capture
    6. VOID : Cancelling a Capture in Wait Status of a Capture.
    7. REFUND : Refund After a Capture

    LINE Pay Integration Flow

    Normal Payment

    Request Payment – Payment Screen

    The payment reservation process, which differs depending on LINE Pay users' access environment, is shown below:

    Pc payment reserve payment

    Figure 3 Payment reservation process for PC - Payment screen

    1. The LINE Pay user selects a payment method from the Merchant's purchase order.
    2. The Merchant calls LINE Pay's "Payment Reserve API" to create payment reservation information and gets a transaction Id, which is required information for payment confirmation and must be kept by the Merchant, and "paymentUrl."
    3. The Merchant calls the paymentUrl (provided by LINE Pay) received in step b.
    4. The LINE Pay user goes through channel web login1 that checks if the user is a LINE user.
      4.1. This is a process of verifying if the user is a LINE user before using LINE services. The channel web login process is skipped if the Merchant can access the LINE user information and forward mid when reserving payment.
    5. The LINE Pay server pushes a payment request to LINE after the user successfully logs in to LINE.
    6. The LINE user gets notified of the payment request on the LINE app and moves to the payment screen.

    Mobile payment reserve payment

    Figure 4 Payment reservation for mobile - payment screen

    1. The LINE Pay user selects a payment method from the Merchant's purchase order.
    2. The Merchant calls LINE Pay's "Reserve Payment API" to create payment reservation information and gets a transaction Id, which is required information for payment confirmation and must be kept by the Merchant, and "paymentUrl."
    3. The Merchant calls the paymentUrl (provided by LINE Pay) received in step b.
    4. Using the paymentUrl, the Merchant redirects the LINE Pay user to the payment screen in the LINE app. The paymentUrl is divided into web and app, depending on the integration environment.
      • web: A web screen provided by LINE Pay. The Merchant checks whether the LINE app is installed before redirecting the user to the LINE Pay payment screen.
      • app: An app scheme URL to directly move to the LINE Pay payment screen. For how to check whether the LINE app is installed and available versions of LINE Pay (for Android only), please refer to How to use PaymentUrl App Guide

    Payment Screen - Payment Completion

    After selecting a payment method (credit card or balance) to process the payment, the LINE Pay user moves to the "confirmUrl" (added by transactionId in LINE Pay) received from the Merchant when the payment is reserved. Then, the Merchant calls the "Payment confirm API " to complete the payment.

    Pc payment reserve complete

    Figure 5 Payment screen for PC –Payment completion

    1. The LINE Pay user selects a payment method on the LINE Pay payment screen and enters the password.
    2. LINE Pay stores the payment method information and sets the payment status to ‘authorized’.
    3. The LINE Pay user checks the payment information screen.
    4. When the transaction becomes payable on the Awaiting Payment screen, the user is redirected to the "confirmUrl" received from the Merchant when the payment is reserved.
    5. The Merchant calls the Confirm Payment API to complete the payment.

    Mobile payment reserve complete

    Figure 6 Payment screen for mobile – Payment completion

    1. The LINE Pay user selects a payment method on the LINE Pay payment screen and enters the password.
    2. LINE Pay stores the payment method information and sets the payment status to ‘authorized’.
    3. After checking the payment information screen on the LINE app, the LINE Pay user clicks ‘OK’ on the bottom to move to the "confirmUrl" received when the payment is reserved.
    4. The Merchant calls the Confirm Payment API to complete the payment.

    When the authorization of payment is separated from the capture of the authorized payment

    The overall process is similar to those above, but the Merchant should set "capture" as "false" when calling the Reserve Payment API.
    When the Merchant calls the Confirm Payment API, the payment status is saved as AUTHORIZATION

    When capturing the payment,

    When Calling confirmUrl from Server to Server

    The payment can be made by only the communication between the Merchant server and the LINE Pay server, with delivering confirmUrl.

    Send confirm url server to server

    Figure 7 Calling ConfirmUrl from server to server

    1. When reserving the payment, the Merchant should pass confirmUrlType : "SERVER".
    2. The LINE Pay user selects a payment method and enters the password after entering the LINE Pay payment screen.
    3. The LINE Pay server saves the payment information and calls the confirmUrl received from the Merchant when the payment is reserved. [Appendix] “Please refer to the case of Calling Confirm Url from Server-to-Server”
    4. The Merchant server calls the Confirm Payment API to complete the payment. Please note that the Merchant server can call the Confirm Payment API only after the response for the ConfirmUrl is successfully sent.

    Preapproved Payment

    Payment Request - Payment Screen

    The overall flow is the same as the normal payment, except that "payType" should be set as "PREAPPROVED."

    Payment Screen - Payment Completion and regKey (for preapproved payment) Issuance

    A regKey is delivered with the response information of payment confirmation additionally. The Merchant must save this key to use preapproved payment later.

    Preapproved Payment

    Preapproved payment

    Figure 9 Preapproved Payment

    When the payment is confirmed, the Merchant server calls "Preapproved Payment API " by using the regKey to make a payment. The LINE Pay user does not intervene during the payment process, but can be notified when the payment is completed.

    regKey (for Preapproved Payment) Expiration

    You can call the Expire regKey API so that unnecessary regKeys expire. For more information, refer to “Expire regKey”

    How to Use LINE Pay APIs

    This chapter details how to implement payments using LINE Pay. Before using LINE Pay APIs, Merchant's verification information can be viewed at Merchant Center2 (http://pay.line.me) after evaluation process is complete.

    Common Features

    LINE Pay Authentication

    Required authentication information for LINE Pay integration is as below.

    Above information is sent by Header script and you can find them in each API specification.

    Request Header

    Item Data Type Required? Description
    Content-Type String Y application/json
    X-LINE-ChannelId String(10) Y Payment Integration Information - Channel ID
    X-LINE-ChannelSecret String(32) Y Payment Integration Information - Channel Secret Key
    X-LINE-MerchantDeviceProfileId String(32) N Offline Support - Device Type

    Infra and Tech Support

    If you have questions for infra condition, technical support or facing internal error, please contact us via email (pay_tech@linecorp.com).

    Env. URL Description
    Sandbox https://sandbox-api-pay.line.me Environment for integration testing
    You can process the payment by Sandbox’s web simulation payment page instead of LINE Pay app.
    Please refer to the appendix(Sandbox usage Guide)
    Real https://api-pay.line.me Real Service Environment

    Contact for Tech Support

    If you have questions for integration process or internal error, please contact LINE Pay Tech Support team by sending Email. Please see contact information below.

    Department Contact Applied Country
    LINE Pay Japan dl_tech_support_jp@linecorp.com Japan
    LINE Pay Thailand dl_tech_support_th@linecorp.com Thailand
    LINE Pay Taiwan dl_tech_support_tw@linecorp.com Taiwan
    LINE Pay Global dl_tech_support_global@linecorp.com Other countries

    Get Payment Details API

    Gets the details of payments made with LINE Pay. This API only gets the payments that have been captured.

    Get Payment Details Request

    Table 1 Get Payment Details API Request Parameter

    Item Data Type Required Description
    transactionId[] number N A transaction ID issued by LINE Pay, for payment or refund.
    orderId[] String N Merchant Transaction Order ID

    Get Payment Details API Response

    Table 2 Get Payment Details API Response Body

    Item Data Type Description
    returnCode String(4) Result code
    • 0000: Successful
    • 1104: Merchant not found.
    • 1105: This Merchant cannot use LINE Pay.
    • 1106: Header information error
    • 1150: Transaction record not found.
    • 1177: Exceeding max number(100) of transactions allowed to retrieve
    • 9000: Internal error
    returnMessage String Result messages or reason for failure
    info[].transactionId number Transaction number (19 digits)
    info[].transactionDate String Transaction date & time(ISO-8601)
    info[].transactionType String Transaction types
    • PAYMENT: Payment
    • PAYMENT_REFUND: Refund
    • PARTIAL_REFUND: Partion refund
    info[].productName String Merchant's order number
    info[].merchantName String Merchant Name
    info[].currency String Currency(ISO 4217)
    info[].authorizationExpireDate String Expiration Date of Authorization (ISO-8601)
    info[].payInfo[].method String Payment method used
    ( Credit card: CREDIT_CARD, Balance: BALANCE, Discount: DISCOUNT )
    info[].payInfo[].amount number Transaction amount (Amount transacted when the transaction Id was generated)
    The final transaction amount when retrieving the original transaction is
    sum(info[].payInfo[].amount) – sum(refundList[].refundAmount)
    info[].merchantReference.affiliateCodes[] String Merchant affiliated Codes when belonged to the affiliated transaction
    info[].merchantReference.affiliateCodes[].cardType String Affiliated card type when belonged to the affiliated transaction and user has an affiliate card.
    info[].merchantReference.affiliateCodes[].cardId String Affiliated card id when belonged to the affiliated transaction and user has an affiliate card.
    Retrieving original transactions & When there is a refund
    info[].refundList[].refundTransactionId number Refunded transaction number (19 digits)
    info[].refundList[].transactionType String Transaction types
    • PAYMENT_REFUND: Refund
    • PARTIAL_REFUND: Partial Refund
    info[].refundList[].refundAmount number Refund Amount
    info[].refundList[].refundTransactionDate String Refunded transaction date & time (ISO-8601)
    When retrieving a refund
    info[].originalTransactionId number Original payment transaction number (19 digits)
    info[].events[].code String(30) Unique event code which allows only alphanumeric.
    info[].events[].totalAmount Number Amount to be applied to rate promotion.
    info[].events[].productQuantity Number Amount to be applied to fixed promotion.

    Examples of Using Get Payment Details API

    Source 1 Get Payment Details API Request

    
    GET https://sandbox-api-pay.line.me/v2/payments?transactionId=2019060112345678910&orderId=20191002045572 HTTP/1.1
    
    Content-Type: application/json
    X-LINE-ChannelId: {channel id}
    X-LINE-ChannelSecret: {channel secret}
    X-LINE-MerchantDeviceProfileId: {DEVICE_PROFILE_ID}
    
    

    Source 2 Get Payment Details API Response (When retrieving original transactions)

    { 
       "returnCode":"0000",
       "returnMessage":"success",
       "info":[{ 
          "transactionId":2019060112345678910,
          "transactionDate":"2019-06-01T09:00:00Z",
          "transactionType":"PAYMENT",
          "payInfo": [
              {"method":"BALANCE", "amount":10},
              {"method":"DISCOUNT", "amount":10}
            ],
          "productName":"tes production",
          "currency":"USD",
          "orderId":"20191002045572",
          "refundList":[ 
             { 
                "refundTransactionId":"2019060212345678912",
                "transactionType":"PARTIAL_REFUND",
                "refundAmount":-1,
                "refundTransactionDate":"2019-06-02T09:48:52Z"
             },
             { 
                "refundTransactionId":"2019060312345678912",
                "transactionType":"PARTIAL_REFUND",
                "refundAmount":-1,
                "refundTransactionDate ":"2019-06-02T09:49:28Z"
             },
             { 
                "refundTransactionId":"2019060412345678912",
                "transactionType":"PARTIAL_REFUND",
                "refundAmount":-1,
                "refundTransactionDate ":"2019-06-02T09:53:18Z"
             }
          ],
          "events":[
            {
              "code": "alphanumeric",
              "totalAmount": 500,
              "productQuantity": null
            },
            {
              "code": "alphanumeric2",
              "totalAmount": null,
              "productQuantity": 10
            }
          ]
       }]
    }
    
    

    Source 3 Get Payment Details API Response (When retrieving a refund)

    { 
       "returnCode":"0000",
       "returnMessage":"success",
       "info":[{ 
          "transactionId":2019060112345678912,
          "transactionDate":"2019-06-01T09:48:43Z",
          "transactionType":"PARTIAL_REFUND",
          "amount":-5,
          "productName":"",
          "currency":"USD",
          "orderId":"20190101123123123",
          "originalTransactionId":2019060112345678910
       }]
    }
    

    Source 4 Get Payment Details API Response (When merchant affiliated codes exist)

    {
        "returnCode":"0000",
        "returnMessage":"success",
        "info":[{
            "transactionId":2019062812345678910,
            "transactionDate":"2019-06-28T09:48:43Z",
            "transactionType":"PAYMENT",
            "payInfo": [
                 {"method":"BALANCE", "amount":10},
                 {"method":"DISCOUNT", "amount":10}
             ],
            "productName":"tes production",
            "currency":"USD",
            "orderId":"20191128123123123",
            "merchantReference" : {
                "affiliateCodes" :["AFFL_18112001","AFFL_18112002"]
            }
        }]
    }
    

    Source 5 Get Payment Details API Response (When merchant affiliated cards exist)

    {
        "returnCode": "0000",
        "returnMessage": "success",
        "info": [{
            "transactionId": 2019062812345678910,
            "transactionDate": "2019-06-28T09:48:43Z",
            "transactionType": "PAYMENT",
            "payInfo": [
                {"method": "BALANCE","amount": 10},
                {"method": "DISCOUNT","amount": 10}
            ],
            "productName": "tes production",
            "currency": "USD",
            "orderId": "20191128123123123",
            "merchantReference": {
                "affiliateCards": [
                     {"cardType": "POINT_CARD","cardId": "4822456212454"},
                     {"cardType": "LINESHOP_CARD","cardId": "LP822456212454"}
                ]
            }
        }]
    }
    

    Reserve Payment API

    Prior to processing payments with LINE Pay, the Merchant is evaluated if it is a normal Merchant store then the information is reserved for payment. When a payment is successfully reserved, the Merchant gets a "transaction Id" that is a key value used until the payment is completed or refunded.

    Reserve Payment Request

    Table 3 Reserve Payment API Request Parameter

    Item Date Type Required? Description
    productName String(4000) Y Product Name(charset: UTF-8)
    productImageUrl String(500) N Product image URL
    Image URL to be displayed on the Payment screen
    • Size: 84 x 84(Image to be displayed only on the Payment screen. Recommended to follow guidelines)
    amount number Y Payment amount
    currency String(3) Y Payment currency(ISO 4217)
    Supported currencies are as follows.
    • USD
    • JPY
    • TWD
    • THB
    confirmUrl String(500) Y Merchant's URL that the buyer is redirected to after selecting a payment method and entering the payment password in LINE Pay.
    • On the redirected URL, Merchant can call Confirm Payment API and complete the payment
    • LINE Pay passes an additional parameter, "transactionId"

    Reference Detailed Explanation and Exceptional Case of ConfirmUrl
    confirmUrlType String N confirmUrl Type
    Type of URL that the buyer is redirected to after selecting a payment method and entering the payment password in LINE Pay
    • CLIENT: A user based URL (default)
    • SERVER: A server based URL. Users just need to check the payment information screen in LINE Pay which then notifies the Merchant server that the payment is available.
    checkConfirmUrlBrowser Boolean N When moved to confirmUrl, Check a browser
    • true: When a browser calling a payment and a browser directing to confirmUrl are not identical, LINE Pay provides a Guide Page directing to a previous browse.
    • false(Default Value): Directing to ConfirmUrl without checking a browser

    Refernce Detailed Explanation and Exceptional Case of ConfirmUrl
    cancelUrl String(500) N Payment Cancellation page URL
    • The URL redirected to, from the LINE App Payment page when the LINE Pay user cancels payment (URL for the Merchant accessing via mobile devices to go to the Merchant's app or website when the payment is canceled)
    • URL sent by Merchant is used as is
    • No additional parameters sent by LINE Pay
    packageName String(4000) N Information to avoid phishing during transition between apps in Android.
    orderId String(100) Y Merchant's order number corresponding to the payment request
    • A unique number managed by a Merchant Recipient contact (for Risk Management)
    deliveryPlacePhone String(100) N Recipient contact (for Risk Management)
    payType String(12) N Payment types
    • NORMAL(Default Value): Single payment
    • PREAPPROVED: Preapproved payment
    langCd String N Language codes on the payment waiting screen (paymentUrl). Supports a total of six languages.
    • ja: Japanese
    • ko: Korean
    • en: English
    • zh-Hans: Chinese (Simplified)
    • zh-Hant: Chinese (Traditional)
    • th: Thai
      • Language codes are not mandatory but if not received, multiple languages are supported based on the accept-language header.
      • If an unsupported langCd is received, English ("en") is used by default.
      • BCP-47 format: http://en.wikipedia.org/wiki/IETF_language_tag
    capture Boolean N Whether to capture or not
    • true(Default value): Payment authorization and capture are handled at once when the Confirm Payment API is called (default).
    • false: A payment is completed only after it is authorized and then separately captured by calling "Capture API" , when the Confirm Payment API is called
    ExtraFields
    extras.addFriends object[] N Add Friends List
    • type : Service type
      • "LINE_AT" : line@
    • idList : id list (ID List (ID list registered at the LINE@/OA Management menu on Merchant Center))
        "addFriends" : [{
            "type": "LINE_AT",
            "idList" : ["@aaa", "@bbb"]
        }]
    extras.branchName String (2000) N Branch Name where the payment is requested from (Only 100 letters will be displayed if it's exceeded.)
    extras.branchId String (32) N Branch Id where the payment is requested.
    It can be support alphabets, numbers and special characters.
    extras.promotionRestriction object N Promotion Restriction info.
    • useLimit: amount NOT for Promotions Use
    • rewardLimit: amount NOT for Promotions Rewards
    "promotionRestriction" : {
        "useLimit" : 100,
        "rewardLimit" : 100
    }

    Payment Reserve Response

    Table 4 Payment Reserve Response Body

    Item Data Type Description
    returnCode String(4) Result Code
    • 0000: Successful
    • 1104: Merchant not found.
    • 1105: This Merchant cannot use LINE Pay.
    • 1106: Header information error.
    • 1124: Error in amount (scale).
    • 1145: Payment in progress.
    • 1172: Existing same orderId.
    • 1178: Unsupported currency.
    • 1194: This Merchant cannot use preapproved payment.
    • 2101: Parameter error
    • 2102: JSON Data format error
    • 9000: Internal error
    returnMessage String Result messages or reason for failure. Examples are as follows:
    • Merchant unauthorized for payment
    • Merchant verification information error
    info.transactionId Number Transaction number(19 digits)
    info.paymentUrl.web String Web URL to go to after payment request
    • Used if payment request was made in Web environment
    • URL to the LINE Pay payment waiting screen
    • Redirected to the provided URL without any additional parameters
    • When a pop-up browser from a Desktop is opened, Size
      • Width: 700px, Height : 546px
    info.paymentUrl.app String App URL to the Payment Screen
    • Used if payment request was made in an app
    • Redirecting URL from Merchant's app to LINE Pay App
    Reference How to Use PaymentUrl App
    info.paymentAccessToken String Code Value (12 digits) using for input a code instead of using a Scanner on LINE app.
    (Supports a Scanner of LINE Pay app above LINE 5.1 Version)

    Examples of Using Reserve Payment API

    Source 4 Reserve Payment API Request

    
    POST https://sandbox-api-pay.line.me/v2/payments/request HTTP/1.1
    Content-Type: application/json
    X-LINE-ChannelId: {channel id}
    X-LINE-ChannelSecret: {channel secret}
    X-LINE-MerchantDeviceProfileId: {DEVICE_PROFILE_ID}
    {
        "productName": "Test Product",
        "orderId": "ORD_i0q1kW0yFrOp0fCAvctq7g6Y3",
        "confirmUrlType": "CLIENT",
        "currency": "JPY",
        "amount": 100,
        "capture": true,
        "payType": "NORMAL",
        "cancelUrl": "https://tools-merchant.com/payment/general/confirm?type=cancel",
        "confirmUrl": "https://tools-merchant.com/payment/general/confirm?orderId=ORD_i0q1kW0yFrOp0fCAvctq7g6Y3",
        "productImageUrl": "https://tools-merchant.com/cony-money-box-1.jpg",
        "extras": {
            "addFriends": [{
                "type": "LINE_AT",
                "idList": ["@aaa", "@bbb"]
            }],
            "branchName": "test_branch_1",
            "branchId": "branch1"
        }
    
    

    Source 5 Reserve Payment API Response

    {
        "returnCode": "0000",
        "returnMessage": "Success.",
        "info": {
            "paymentUrl": {
                "web": "https://sandbox-web-pay.line.me/web/payment/wait?transactionReserveId=cFJFbUx5aU5NSGxZUmRnWmtQV1ZPT3pZb0c3Ym9NcGMvM0s3WGdHc2JGeGUyU09mNGRJRi83ZWxzL3l3OVEreg",
                "app": "line://pay/payment/cFJFbUx5aU5NSGxZUmRnWmtQV1ZPT3pZb0c3Ym9NcGMvM0s3WGdHc2JGeGUyU09mNGRJRi83ZWxzL3l3OVEreg"
            },
            "transactionId": "2019061311372683710",
            "paymentAccessToken": "113552948987"
        }
    }
    

    Payment Confirm API

    This API is used for a Merchant to complete its payment. The Merchant must call Confirm Payment API to actually complete the payment. However, when "capture" parameter is "false" on payment reservation, the payment status becomes AUTHORIZATION, and the payment is completed only after "Capture API" is called.

    Payment confirm Request

    Table 5 Payment confirm API Request Parameter

    Item Data Type Required? Description
    amount number Y Payment amount
    currency String(3) Y Payment currency(ISO 4217)
    Supported currencies are as follow:
    • USD
    • JPY
    • TWD
    • THB

    Payment ConfirmAPI Response

    Table 6 Payment confirm API Response Body

    Item Data Type Description
    returnCode String(4) Result Code
    • 0000: Successful
    • 1101: The purchasing user suspended for transaction.
    • 1102: The purchasing user suspended for transaction.
    • 1104: Merchant not found.
    • 1105: This Merchant cannot use LINE Pay.
    • 1106: Header information error.
    • 1110: Not available credit card.
    • 1124: Error in amount (scale).
    • 1141: Account status error.
    • 1142: Insufficient balance remains.
    • 1150: No transactions found.
    • 1152: Transaction has already been made.
    • 1153: Request amount is different from real amount.
    • 1159: Omitted request payment information.
    • 1169: Payment method and password must be certificated by LINE Pay.
    • 1170: User’s account remains have been changed.
    • 1172: Existing same orderId.
    • 1180: Expired the payment date.
    • 1198: Duplicated the request calling API.
    • 1199: Internal request error.
    • 1280: Temporary error occurred while making payment with credit card
    • 1281: Credit card payment error
    • 1282: Credit card authorization error
    • 1283: The payment has been rejected due to suspected fraud.
    • 1284: Credit card payment is temporarily not available.
    • 1285: Omitted credit card information
    • 1286: Incorrect credit card payment information
    • 1287: Credit card expiration date has passed.
    • 1288: Credit card has insufficient funds.
    • 1289: Maximum credit card limit exceeded
    • 1290: One-time payment limit exceeded.
    • 1291: This card has been reported stolen.
    • 1292: This card has been suspended.
    • 1293: Invalid Card Verification Number (CVN)
    • 1294: This card is blacklisted.
    • 1295: Invalid credit card number.
    • 1296: Invalid amount.
    • 1298: The Credit card payment declined.
    • 9000: Internal error
    returnMessage String Result messages or reason for failure. Examples are as follows:
    • Merchant unauthorized for payment
    • Merchant Authorization information error
    info.orderId String Order number sent from Merchant upon reserving a payment
    info.transactionId number Transaction number (19 digits) received as a result after reserving a payment
    info.authorizationExpireDate String opt-authorization expiration date(ISO 8601)
    • When the payment status is AUTHORIZATION (capture=false)
    info.payInfo[].method String Payment method used
    • Credit card: CREDIT_CARD, Balance: BALANCE, Discount: DISCOUNT
    info.payInfo[].amount number Payment amount
    info.payInfo[].creditCardNickname String For opt-Preapproved Payment, Credit card nickname
    • Initially registered credit card name managed by LINE Pay.
    • If LINE Pay user has not set a nickname, blank text is displayed.
    • The nickname can be changed when requested by the user in LINE Pay and changed name is not share with the Merchant.
    info.payInfo[].creditCardBrand String For opt-Preapproved Payment, Credit card brand
    • VISA
    • MASTER
    • AMEX
    • DINERS
    • JCB
    info.regKey String opt-Key for preapproved payment (15 digits)
    info.merchantReference.affiliateCodes[] String Merchant affiliated Codes when belonged to the affiliated transaction
    info.merchantReference.affiliateCards[].cardType String Affiliated card type when belonged to the affiliated transaction and user has an affiliate card.
    info.merchantReference.affiliateCards[].cardId String Affiliated card id when belonged to the affiliated transaction and user has an affiliate card.

    Examples of Payment confirm API

    Source 6 Payment Confirm API Request

    
    POST https://sandbox-api-pay.line.me/v2/payments/2019061211372655410/confirm HTTP/1.1
    Content-Type: application/json
    X-LINE-ChannelId: {channel id}
    X-LINE-ChannelSecret: {channel secret}
    X-LINE-MerchantDeviceProfileId: {DEVICE_PROFILE_ID}
    {
        "amount": 1000,
        "currency": "JPY"
    }
    
    

    Source 7 Payment Confirm API Response (Balance payment when the payType is NORMAL)

    {
        "returnCode": "0000",
        "returnMessage": "Success.",
        "info": {
            "transactionId": 2019061211372655410,
            "orderId": "ORD_SMCD1JHbLLvdESnykyJjgGQ3Q",
            "payInfo": [{
                "method": "BALANCE",
                "amount": 889
            }, {
                "method": "DISCOUNT",
                "amount": 111
            }]
        }
    }
    
    

    Source 8 Payment Confirm API Response (Mixed Payment when the payType is NORMAL)

    {
        "returnCode": "0000",
        "returnMessage": "Success.",
        "info": {
            "orderId": "ORD_SMCD1JHbLLvdESnykyJjgGQ3Q",
            "transactionId": 2019061211372655410,
            "payInfo": [{
                "method": "BALANCE",
                "amount": 10
            }, {
                "method": "POINT",
                "amount": 5
            }]
        }
    }
    
    

    Source 9 Payment Confirm API Response (When the payType is PREAPPROVED)

    {
        "returnCode": "0000",
        "returnMessage": "Success.",
        "info": {
            "orderId": "ORD_SMCD1JHbLLvdESnykyJjgGQ3Q",
            "transactionId": 2019061211372655410,
            "payInfo": [{
                "method": "CREDIT_CARD",
                "amount": 10,
                "creditCardNickname": "test",
                "creditCardBrand": "VISA"
            }],
            "regKey": "RKf930b19XTF1TX"
        }
    }
    

    Source 10 Payment Confirm API Response (When merchant affiliated codes exist)

    {
        "returnCode":"0000", 
        "returnMessage":"Success.",
        "info": {
            "orderId": "ORD_SMCD1JHbLLvdESnykyJjgGQ3Q", 
            "transactionId": 2019061211372655410, 
            "payInfo": [
                {
                    "method": "BALANCE",
                    "amount": 10
                }, 
                {
                    "method": "POINT",
                    "amount": 5
                }
            ],
            "merchantReference": { 
                "affiliateCodes" : ["AFFL_18112001","AFFL_18112002"]
            }
    

    Source 11 Payment Confirm API Response (When merchant affiliated cards exist)

    {
        "returnCode":"0000", 
        "returnMessage":"Success.",
        "info": {
            "orderId": "ORD_SMCD1JHbLLvdESnykyJjgGQ3Q", 
            "transactionId": 2019061211372655410, 
            "payInfo": [    
                {
                    "method": "BALANCE",
                    "amount": 10
                },
                {
                    "method": "POINT",
                    "amount": 5
                }
            ],
            "merchantReference": { 
                "affiliateCards": [
                    {
                        "cardType": "POINT_CARD",
                        "cardId": "4822456212454"
                    },
                    {
                        "cardType": "LINESHOP_CARD",
                        "cardId": "LP822456212454"
                    }
                ]
            } 
        }
    }
    

    Refund Payment API

    Requests refund of payments made with LINE Pay. To refund a payment, the LINE Pay user's payment transaction Id must be forwarded. A partial refund is also possible depending on the refund amount.

    Refund Payment Request

    Table 7 Refund Payment API Request Parameter

    Item Data Type Required? Description
    refundAmount number N Refund amount
    • Full refund if this parameter is not passed
    Extra fields
    extras.promotionRestriction object N Promotion Restriction info.
    • useLimit: amount NOT for Promotions Use
    • rewardLimit: amount NOT for Promotions Rewards
    "promotionRestriction" : {
        "useLimit" : 100,
        "rewardLimit" : 100
    }

    Refund Payment Response

    Table 8 Refund Payment API Response Body

    Item Data Type Description
    returnCode String(4) Result Code
    • 0000: Successful
    • 1101: The purchasing user suspended for transaction.
    • 1102: The purchasing user suspended for transaction.
    • 1104: Merchant not found.
    • 1105: This Merchant cannot use LINE Pay.
    • 1106: Header information error
    • 1124: Payment Amount error
    • 1150: Transaction record not found.
    • 1155: The transaction Id not eligible for Refund.
    • 1163: Exceeded the expiration for Refund.
    • 1164: Refund limit exceeded.
    • 1165: The transaction has already been refunded.
    • 1179: Status can not be processed.
    • 1198: Duplicated the request calling API.
    • 1199: Internal request error.
    • 9000: Internal error
    returnMessage String Result messages or reason for failure
    info.refundTransactionId number Refunded transaction number (newly issued number - 19 digits)
    info.refundTransactionDate String Refunded transaction date & time (ISO 8601)

    Examples of Using Refund Payment API

    Source 10 Refund Payment API Request

    
    POST https://sandbox-api-pay.line.me/v2/payments/2019060112345678910/refund HTTP/1.1
    
    Content-Type: application/json
    X-LINE-ChannelId: {channel id}
    X-LINE-ChannelSecret: {channel secret}
    X-LINE-MerchantDeviceProfileId: {DEVICE_PROFILE_ID}
    
    {
        "refundAmount": 500,
        "extras" : {
            "promotionRestriction" : {
                "useLimit" : 20,
                "rewardLimit" : 20
            }
        }
    }
    
    

    Source 11 Refund Payment API Response

    {
        "returnCode": "0000",
        "returnMessage": "success",
        "info": {
            "refundTransactionId": 2019060112345678911,
            "refundTransactionDate": "2019-06-06T09:00:00Z"
        }
    }
    
    

    Get Authorization Details API

    Gets the details authorized with LINE Pay. This API only gets data that is authorized or whose authorization is voided; the one that is already captured can be viewed by using "Get Payment Details API”.

    Get Authorization Details Request

    Table 9 Get Authorization Details API Request Parameter

    Item Data Type Required? Description
    transactionId[] number N Transaction number issued by LINE Pay
    orderId[] String N Order number of Merchant

    Get Authorization Details Response

    Table 10 Get Authorization Details API Response Body

    Item Data Type Description
    returnCode String(4) Results code
    • 0000: Successful
    • 1104: Merchant not found.
    • 1105: This Merchant cannot use LINE Pay.
    • 1106: Header information error
    • 1150: Transaction record not found.
    • 1177: Exceeded max number of transactions (100) allowed to be retrieved.
    • 9000: Internal error
    returnMessage String Result messages or reason for failure
    info[].transactionId number Transaction number (19 digits)
    info[].transactionDate String Transaction date(ISO 8601)
    info[].transactionType String Transaction type
    • PAYMENT: Payment
    • PAYMENT_REFUND: Refund
    • PARTIAL_REFUND: Partial Refund
    info[].payStatus String Payment status
    • AUTHORIZATION: Authorized
    • VOIDED_AUTHORIZATION: Authorization voided “Void Authorization API” is called)
    • EXPIRED_AUTHORIZATION: Authorization expired (The authorization period allowed by LINE Pay expired)
    info[].payInfo[].method String Payment method
    • (Credit card: CREDIT_CARD, balance: BALANCE, Discount: DISCOUNT)
    info[].payInfo[].amount number Transaction amount (when a transaction Id is created)
    The final transaction amount is sum(info[].payInfo[].amount) – sum(refundList[].refundAmount)
    info[].productName String Product name
    info[].currency String Currency(ISO 4217)
    info[].orderId String Order number of Merchant
    info[].authorizationExpireDate String Authorization expiration date and time(ISO 8601)
    info[].events[].code String(30) Unique event code which allows only alphanumeric.
    info[].events[].totalAmount Number Amount to be applied to rate promotion.
    info[].events[].productQuantity Number Amount to be applied to fixed promotion.

    Examples of Using Get Authorization Details API

    Source 12 Get Authorization Details API Request

    
    GET https://sandbox-apipay.line.me/v2/payments/authorizations?transactionId=2019060112345678910 HTTP/1.1
    Content-Type: application/json
    X-LINE-ChannelId: {channel id}
    X-LINE-ChannelSecret: {channel secret}
    X-LINE-MerchantDeviceProfileId: {DEVICE_PROFILE_ID}
    

    Get Authorization Details API Response

    
    {
        "returnCode": "0000",
        "returnMessage": "success",
        "info": [{
            "transactionId": 2019060112345678910,
            "transactionDate": "2019-06-01T09:00:00Z",
            "transactionType": "PAYMENT",
            "payInfo": [{
                "method": "BALANCE",
                "amount": 10
            }, {
                "method": "DISCOUNT",
                "amount": 10
            }],
            "productName": "tes production",
            "currency": "USD",
            "orderId": "20190601ORD45678910",
            "payStatus": "AUTHORIZATION",
            "authorizationExpireDate": "2019-06-30T09:00:00Z"
        }]
    }
    
    

    Capture API

    If "capture" is "false" when the Merchant calls the “Reserve Payment API” , the payment is completed only after the Capture API is called.

    Capture Request

    Table 11 Captire API Request Parameter

    Item Data Type Required? Description
    amount number Y Payment amount
    currency String(3) Y Payment currency (ISO 4217)
    The following currencies are supported.
    • USD
    • JPY
    • TWD
    • THB
    Extra fields
    extras.promotionRestriction object N Promotion Restriction info.
    • useLimit: amount NOT for Promotions Use
    • rewardLimit: amount NOT for Promotions Rewards
    "promotionRestriction" : {
        "useLimit" : 100,
        "rewardLimit" : 100
    }

    Capture Response

    Table 12 Capture API Response Body

    Item Data Type Description
    returnCode String(4) Result code
    • 0000: Successful
    • 1104: Merchant not found.
    • 1105: This Merchant cannot use LINE Pay.
    • 1106: Header information error
    • 1150: Transaction record not found.
    • 1155: Wrong TransactionId.
    • 1170: User’s account remains have been changed.
    • 1172: Existing same orderId.
    • 1179: Status can not be processed.
    • 1180: Expired the payment date.
    • 1183: Payment Amount Error
    • 1184: Payment amount exceeds amount requested.
    • 1198: Duplicated the request calling API or Called Capture API during processing internal re- authorization. (Re-try in a few minutes)
    • 1199: Internal request error.
    • 1280: Temporary error occurred while making a payment with credit card
    • 1281: Credit card payment error
    • 1282: Credit card authorization error.
    • 1283: The payment has been declined due to suspected fraud.
    • 1284: Credit card payment is temporarily not available.
    • 1285: Omitted credit card information.
    • 1286: Incorrect credit card payment information.
    • 1287: Credit card expiration date has passed.
    • 1288: Credit card has insufficient funds.
    • 1289: Maximum credit card limit exceeded.
    • 1290: One-time payment limit exceeded.
    • 1291: This card has been reported stolen.
    • 1292: This card has been suspended.
    • 1293: INVALID CARD VERIFICATION NUMBER (CVN)
    • 1294: This card is blacklisted.
    • 1295: Invalid credit card number.
    • 1296: Invalid amount.
    • 1298: The credit card payment declined.
    • 9000: Internal error
    • When an Error code 1199,1280~1298 occurs, the transaction cancels automatically.
    returnMessage String Result messages or reason for failure. Examples are as follows:
    • Merchant unauthorized for payment
    • Merchant verification information error
    info.orderId String Order number passed from the Merchant when a payment reservation is made.
    info.transactionId number Transaction number (19 digits)
    info[].payInfo[].method String Payment method
    • (Credit card: CREDIT_CARD, balance: BALANCE, Discount: DISCOUNT)
    info.payInfo[].amount number Payment amount

    Examples of Using Capture API

    Source 14 Capture API Request

    
    POST https://sandbox-api-pay.line.me/v2/payments/authorizations/2019060112345678910/capture HTTP/1.1
    Content-Type: application/json
    X-LINE-ChannelId: {channel id}
    X-LINE-ChannelSecret: {channel secret}
    X-LINE-MerchantDeviceProfileId: {DEVICE_PROFILE_ID}
    {
        "amount": 1000,
        "currency": "JPY",
        "extras" : {
            "promotionRestriction" : {
                "useLimit": 20,
                "rewardLimit": 20
            }
        }
    }
    
    
    

    Source 15 Capture API Response

    
    {
        "returnCode": "0000",
        "returnMessage": "OK",
        "info": {
            "transactionId": 20140101123123123,
            "orderId": "order_210124213",
            "payInfo": [{
                "method": "BALANCE",
                "amount": 10
            }, {
                "method": "DISCOUNT",
                "amount": 10
            }]
        }
    }
    
    

    Void Authorization API

    Voids a previously authorized payment. A payment that has been already captured can be refunded by using the “Refund Payment API”.

    Void Authorization Request

    Void Authorization Response

    Table 13 Void Authorization API Response Body

    Item Data Type Description
    returnCode String(4) Result code
    • 0000: Successful
    • 1101: The purchasing user suspended for transaction.
    • 1102: The purchasing user suspended for transaction.
    • 1104: Merchant not found.
    • 1105: This Merchant cannot use LINE Pay.
    • 1106: Header information error.
    • 1150: Transaction record not found.
    • 1155: Wrong TransactionId.
    • 1165: Voided Transaction.
    • 1170: User’s account remains have been changed.
    • 1198: Duplicated the request calling API.
    • 1199: Internal request error.
    • 1900: Temporary Error. Please, try again later.
    • 1902: Temporary Error. Please, try again later.
    • 1999: It does not match the requested information. (When re-trying a request)
    • 9000: Internal error
    • When an Error code 1900,1903,1999 occurs, allowing re-try.
    returnMessage String Result messages or reason for failure. Examples are as follows:
    • Merchant unauthorized for payment
    • Merchant verification information error

    Examples of Using Void Authorization API

    Source 16 Void Authorization API Request

    
    POST https://sandbox-api-pay.line.me/v2/payments/authorizations/2019060112345678910/void HTTP/1.1
    Content-Type: application/json
    X-LINE-ChannelId: {channel id}
    X-LINE-ChannelSecret: {channel secret}
    X-LINE-MerchantDeviceProfileId: {DEVICE_PROFILE_ID}
    
    

    Source 17 Void Authorization API Response

    
    {
        "returnCode": "0000",
        "returnMessage": "Success"
    }
    
    

    Preapproved Payment API

    When the payment type of the Reserve Payment API was set as PREAPPROVED, a regKey is returned with the payment result. Preapproved Payment API uses this regKey to directly complete a payment without using the LINE app.

    Preapproved Payment Request

    Table 14 Preapproved Payment API Request Parameter

    Item Data Type Required? Description
    productName String(4000) Y Product name
    amount number Y Payment amount
    currency String(3) Y Payment currency (ISO 4217)
    Supported currencies are as follows:
    • USD
    • JPY
    • TWD
    • THB
    orderId String(100) Y Merchant's order number corresponding to the payment request.
    A unique number managed by a Merchant.
    capture Boolean N Whether to be captured or not
    • true(Default Value): Authorization and capture are handled at once.
    • false: Handled Capture process and Called “Capture API” in order to complete a payment.

    Preapproved Payment Response

    Table 15 Preapproved Payment API Response Body

    Data Data Type Description
    returnCode String(4) Result code
    • 0000: Successful
    • 1101: The purchasing user suspended for transaction.
    • 1102: The purchasing user suspended for transaction.
    • 1104: Merchant not found.
    • 1105: This Merchant cannot use LINE Pay.
    • 1106: Header information error
    • 1110: Not available credit card.
    • 1124: Error in Amount (scale).
    • 1141: Account status error.
    • 1154: Preapproved payment account not available.
    • 1172: Existing a transaction with the same order ID.
    • 1183: Payment amount must be greater than 0.
    • 1190: The regKey does not exist.
    • 1193: The regKey expired.
    • 1197: Already processing payment with regKey.
    • 1198: Duplicated the request calling API.
    • 1199: Internal request error.
    • 1280: Temporary error while making a payment with credit card
    • 1281: Credit card payment error.
    • 1282: Credit card authorization error.
    • 1283: The payment has been declined due to suspected fraud.
    • 1284: Credit card payment is temporarily not available.
    • 1285: Omitted credit card information.
    • 1286: Incorrect credit card payment information.
    • 1287: Credit card expiration date has passed.
    • 1288: Credit card has insufficient funds.
    • 1289: Maximum credit card limit exceeded.
    • 1290: One-time payment limit exceeded.
    • 1291: This card has been reported stolen.
    • 1292: This card has been suspended.
    • 1293: INVALID CARD VERIFICATION NUMBER (CVN)
    • 1294: This card is blacklisted.
    • 1295: Invalid credit card number.
    • 1296: Invalid amount.
    • 1298: The credit card payment declined.
    • 9000: Internal error
    • When an error code 1141, 1282~1287, 1290~1295 occurs, expire the regKey.
    returnMessage String Result messages or reason for failure
    info.transactionId number Transaction number (19 digits)
    info.transactionDate String Transaction date and time(ISO 8601)
    info.authorizationExpireDate String Expiration Date of Authorization(ISO 8601)
    • Deliver for a transaction authorized only.(Capture=false)

    Examples of Using Preapproved Payment API

    Source 18 Preapproved Payment API Request

    
    POST https://sandbox-api-pay.line.me/v2/payments/preapprovedPay/RK123asd213/payment HTTP/1.1
    Content-Type: application/json
    X-LINE-ChannelId: {channel id}
    X-LINE-ChannelSecret: {channel secret}
    X-LINE-MerchantDeviceProfileId: {DEVICE_PROFILE_ID}
    
    {
        "productName": "Naver Music Monthly Pass",
        "amount": 10000,
        "currency": "JPY",
        "orderId": "testOrd2019121200000001"
    }
    
    

    Source 19 Preapproved Payment API Response

    
    {
        "returnCode": "0000",
        "returnMessage": "OK",
        "info": {
            "transactionId": 2019060112345678910,
            "transactionDate": "2019-01-01T09:00:00Z"   
        }
    }
    
    

    Check regKey Status API

    Checks if regKey is available before using the preapproved payment API.

    Check regKey Status Request

    Table 16 Check regkey Status API Request Parameter

    Item Data Type Required? Description
    creditCardAuth Boolean N Check Authorization for Credit Card minimum amount saved in regKey
    • true :
      - Check Validity Data within LINE Pay
      - Authorize a Credit Card minimum Amount
      - Allow to activate a function of authorizing a Minimum amount in Merchant Information, it is required an inspection from LINE PAY Administrator.
    • false(Default Value) :
      - Check Validity data within LINE Pay.

    Check regKey Status Response

    Table 17 Check regKey Status API Response Body

    Item Data Type Description
    returnCode String(4) Result Code
    • 0000: Successful
    • 1101: The purchasing user suspended for transaction.
    • 1102: The purchasing user suspended for transaction.
    • 1104: Merchant not found.
    • 1105: This Merchant cannot use LINE Pay.
    • 1106: Header information error
    • 1141: Can not authorize a credit card saved in regKey
    • 1154: Preapproved payment account not available
    • 1190: The regKey does not exist.
    • 1193: The regKey expired.
    returnMessage String Result messages or reason for failure

    Examples of Using Check regKey Status API

    Source 20 Check regKey Status API Request

    
    GET https://sandbox-api-pay.line.me/v2/payments/preapprovedPay/RK7862119XTF1TT/check
    HTTP/1.1
    
    Content-Type: application/json
    X-LINE-ChannelId: {channel id}
    X-LINE-ChannelSecret: {channel secret}
    
    

    Source 21 Check regKey Status API Response

    
    {
        "returnCode": "0000",
        "returnMessage": "Success"
    }
    
    

    Expire regKey API

    Expires the regKey information registered for preapproved payment. Once the API is called, the regKey is no longer used for preapproved payments.

    Expire regKey Request

    Expire regKey Response

    Table 18 Expire regKey API Response

    Item Data Type Description
    returnCode String(4) Result code
    • 0000: Successful
    • 1104: Merchant not found.
    • 1105: This Merchant cannot use LINE Pay.
    • 1106: Header information error.
    • 1190: The regKey does not exist.
    • 1193: The regKey expired.
    • 9000: Internal error
    returnMessage String Result messages or reason for failure

    Examples of Expire regKey API

    Source 22 Expire regKey API Request

    
    POST https://sandbox-api-pay.line.me/v2/payments/preapprovedPay/RK123asd213/expire HTTP/1.1
    Content-Type: application/json
    X-LINE-ChannelId: {channel id}
    X-LINE-ChannelSecret: {channel secret}
    
    

    Source 23 Expire regKey API Response

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

    Appendix

    LINE Pay Error Codes

    This section defines error codes of LINE Pay. returnMessage for an error code is provided in English, and if there is no message, hyphen (-) is shown.

    Table 19 LINE Pay Error Codes

    Code Description
    1101 This user is not a LINE Pay user.
    1102 The purchasing user suspended for transaction.
    1104 Merchant not found.
    1105 This Merchant cannot use LINE Pay.
    1106 Header information error
    1110 Not available credit card.
    1124 Error in Amount (scale).
    1141 Account status error.
    1142 Insufficient balance remains.
    1145 Payment in progress.
    1150 Transaction record not found.
    1152 Transaction has already been made.
    1153 Request amount is different from real amount.
    1154 Preapproved payment account not available.
    1155 The transaction Id not eligible for Refund.
    1159 Omitted request payment information.
    1163 Exceeded the expiration for Refund.
    1164 Refund limit exceeded.
    1165 The transaction has already been refunded.
    1169 Payment method and password must be certificated by LINE Pay.
    1170 User’s account remains have been changed.
    1172 Existing same orderId.
    1177 Exceeded max. number of transactions (100) allowed to be retrieved.
    1178 Unsupported currency.
    1179 Status can not be processed.
    1180 Expired the payment date.
    1183 Payment amount must be greater than 0.
    1184 Payment amount exceeds amount requested.
    1190 The regKey does not exist.
    1193 The regKey expired.
    1194 This Merchant cannot use Preapproved Payment.
    1197 Already processing payment with regKey.
    1198 Duplicated the request calling API.
    1199 Internal request error.
    1280 Temporary error while making a payment with Credit Card.
    1281 Credit Card Payment Error
    1282 Credit Card Authorization Error
    1283 The payment has been declined due to suspected fraud.
    1284 Payment amount must be greater than 0.
    1285 Omitted credit card information
    1286 Incorrect credit card payment information
    1287 Credit card expiration date has passed.
    1288 Credit card has insufficient funds.
    1289 Maximum credit card limit exceeded.
    1290 One-time payment limit exceeded.
    1291 This card has been reported stolen.
    1292 This card has been suspended.
    1293 Invalid Card Verification Number (CVN)
    1294 This card is blacklisted.
    1295 Invalid credit card number.
    1296 Invalid amount
    1298 The credit card payment declined.
    2101 Parameter error
    2102 JSON data format error
    9000 Internal error

    If an internal error, 1199, 9000 occurs, contact Technical Support at: (pay_tech@linecorp.com).

    Table 20 Error code by API

    ErrorCode reserve confirm Capture Void Refund AuthorizationDetails PaymentDetails PreapprovedPayment Check regKey Expired regKey
    1101 v v v v v  
    1102 v v v v v  
    1104 v v v v v v v v v v 
    1105 v v v v v v v v v v
    1106 v v v v v v v v v v 
    1110 v v
    1124 v v v v
    1141 v v  
    1142 v  
    1145 v  
    1150 v v v v v  
    1152 v  
    1153 v
    1154 v v  
    1155 v v v  
    1159 v
    1163 v
    1164 v
    1165 v
    1169 v
    1170 v v v  
    1172 v v v v  
    1177 v v  
    1178 v
    1179 v v v  
    1180 v
    1183 v v v  
    1184 v  
    1190 v v v 
    1193 v v  
    1194 v
    1198 v v v v v  
    1199 v v v v v  
    2101 v v v v v v v v v v
    2102 v v v v v v v v v v 
    9000 v v v v v v v v v v 

    Since the error codes from 1280 to 1298 are occurred from Credit Card company, they not necessarily mentioned in this document.

    How to Use PaymentUrl App

    This section provides instructions for redirecting to LINE App after the Merchant's app requests a payment.

    For Android Applications

    Use the following example code to check if the LINE app is installed and the available version of LINE Pay. If the LINE app is installed and the available version of LINE Pay is checked, the user is redirected to the LINE Pay payment screen.

    Android Application example

    
    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) {
            launchUri(paymentUrl);
        } else {
            confirmLineInstall(context);
        }
    } catch (NameNotFoundException e) {
        confirmLineInstall(context);
    }
    
    private void confirmLineInstall(Context context) {
        new AlertDialog.Builder(context)
        .setTitle("LINE Pay")
        .setMessage(getString(R.String.linepay_confirm))
        .setCancelable(false)
        .setPositiveButton(getString(R.String.linepay_install), new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                launchUri("market://details?id=jp.naver.line.android");
            }
        })
        .setNegativeButton(getString(R.String.linepay_cancel), new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
            }
        })
        .show();
    }
    
    private void launchUri(String uriString) {
        Uri uri = Uri.parse(uriString);
        Intent intent = new Intent(Intent.ACTION_VIEW, uri);
        startActivity(intent);
    }
    
    

    File : res/values/Strings.xml

    
    <?xml version="1.0" encoding="utf-8"?>
    <resources>
        ...
        <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>
        ...
    </resources>
    
    

    For iOS Applications

    Use the following example code to check if the LINE app is installed. If the LINE app is installed, the user is redirected to the LINE Pay payment screen.

    iPhone Application example

    
    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), 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:@"itms-apps://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";
    
    

    Detailed Explanation and Exceptional Case of ConfirmUrl

    Detailed Explanation of ConfirmUrl

    Once user completes Payment Authorization process (Select a Payment method and confirm a Payment Password) in LINE Pay app, User is redirected to callback Url.The Url does not represent a Payment Process completion. It is the Url for Merchant page allowing to Call confirm API given by LINE Pay and it will be completed a Final Payment Process.

    Exceptional Case of ConfirmUrl

    When calling confirmUrl after user gets Payment Authorization from LINE Pay, the Browser requested payment and the Browser receiving ConfirmUrl may not be the same browser depending on the user’s type of Operating System (OS).

    Payment confirm flow exception

    When “checkConfirmUrlBrowser” for Payment reserve API is “true”,

    LINE Pay checks out and determines the Browsers whether or not the browser starting Payment process is the same as the browser redirecting automatically according to the result of the following criteria,

    When “checkConfirmUrlBrowser” for Payment reserve API is “false (basic value)”,

    When the processing already occurred based upon session data(e.g. Log in session) is saved in the browser history of merchant User’s payment process can not be continued while calling ConfirmUrl. Therefore, to link to LINE Pay Payment ,Merchant should select the method below and implement it.

    1. ConfirmUrl,which already called,does not authorize based upon session data. It is completed a Payment Process based upon Information in confirmUrl
    2. Examples of Performing session data Process
      • Confirmed session data, Display Browser for Payment Result of Existing Merchant.
      • When Session data is unidentified, Merchant selects one of the 2 methods below and implements it.
        • Display Browser for Payment Result After session data is re-produced (e.g. Log in).
        • User is redirected to the Browser requested payment.

    When Calling confirmUrl from Server to Server

    This section describes specification and examples of confirmUrl called from the LINE Pay server to Merchant server.

    When a merchant manages ACL(Access Control List)

    A merchant should be registered/managed an IP from LINE Pay server. The following IP information is for each environment.

    ConfirmUrl Specification

    Table 21 confirmUrl Endpoint Specification

    Item Description
    Protocol HTTP
    Method GET
    Request timeout Connection: 5 seconds
    Read: 20 seconds

    Table 22 confirmURL Parameters

    Parameter Description
    orderId Order number passed from the Merchant when a payment reservation is made.
    transactionId Transaction number returned as results when a payment reservation is made.

    Merchants do not respond to the confirmUrl call, so LINE Pay determines whether it is successful or not by checking HTTP request Code. If the status code is not "200 OK," inform the LINE Pay user that the payment is not successfully completed.

    Examples of Using confirmUrl

    Examples of using confirmUrl are as follows, where the confirmUrl provided by the Merchant is 'https://testmall.com/pay/result’.

    Request(LINE Pay -> Merchant)

    http://testmall.com/pay/result?orderId=2014xxx1232132&trasactionId=201408011234567890
    

    Response

    // When successful
    HTTP/1.1 200 OK
    Server: Apache-Coyote/1.1
    Accept-Charset: utf-8
    Content-Type: text/html
    Content-Length: 2
    Date: Sat, 11 Oct 2014 02:45:48 GMT
    
    // When failed
    HTTP/1.1 404 NOT_FOUND
    Server:Apache-Coyote/1.1
    Accept-Charset:utf-8
    Content-Type:text/html
    Content-Length:4
    Date:Sat, 11 Oct 2014 02:45:48 GMT
    

    Using Sandbox Methods

    For testing in the Sandbox of LINE Pay, the section, ‘API Endpoint Specification’,in this Integration Guide is stated that merchant should attempt to make a payment using sandbox only and merchant should create page for making a payment. For attempting to make a payment in Sandbox environment, the payment process should be followed as shown below.

    ※ Requirement
    Log-into sandbox is required from all of the channels such PC and mobile.
    (To link to Real on the smart phone, User MID received from LINE will be used. This case does not require the channel log-in.)

    Sandbox PC Payment

    Sandbox pc payment process

    Figure 10 Sample Screen of Sandbox PC Payment Process

    Sandbox Mobile Payment

    Sandbox mobile payment process

    Figure 11 Example Browser of Sandbox Mobile Payment Process