Skip to content

Integrate LINE QRCode Pay

Description

LINE Pay 條碼支付。
LINE Pay 金流參數:通路編號、通路密鑰
情境:

  • 依廠商金流參數設定進行付款:金流參數為必填、門市代碼不需要填
  • 依全通路金流參數設定進行付款:門市代碼為必填、金流參數不需要填

Resource

POST /v1/payment/integrate/pay

Authorization

採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login

Request Body Parameters

Name Type Description
type string 付款方式,請輸入 LINE_QRCODE_PAY
request Request 請求參數
store_id string 門市代碼
(optional)
is_test boolean 是否為測試環境
  • 在全通路正式環境預設為false
  • 在全通路測試環境預設為true
(optional)

Request Body Parameters - Request

Name Type Description
channel_id string 通路編號
(optional)
channel_secret string 通路密鑰
(optional)
productName string 產品名稱
amount integer 付款金額
currency string 付款貨幣
ALLOWED VALUES:
  • USD
  • JPY
  • TWD
  • THB
orderId string 訂單編號
oneTimeKey string 付款條碼
merchant_device_profile_id string 門市設備配置識別碼
格式:{門市編號}_{機號},例如 000030_k1
(optional)

Request

{
  "type": "LINE_QRCODE_PAY",
  "request": {
    "channel_id": "1606993764",
    "channel_secret": "101c18448bf38e160757d53417287bd9",
    "productName": "test product",
    "amount": 10,
    "currency": "TWD",
    "orderId": "20140101123456789",
    "oneTimeKey": "381311008781708305",
    "merchant_device_profile_id": "000030_k1"
  },
  "store_id": "0",
  "is_test": false
}

Response Body Parameters

Name Type Description
returnCode string 結果代碼,0000為成功
returnMessage string 結果訊息或失敗理由
info Info 相關資訊

Response Body Parameters - Info

Name Type Description
transactionId integer 交易編號(19 位數)
orderId string 訂單編號
transactionDate string 交易日期與時間
payInfo Pay Info 付款資訊
balance integer 付款後餘額
(optional)
merchantReference Merchant Reference 商家參考資料
(optional)

Response Body Parameters - Pay Info

Nam Type Description
method string 付款方式
  • CREDIT_CARD
  • BALANCE
  • DISCOUNT
  • POINT(默認不顯示)
amount integer 付款金額
maskedCreditCardNumber string 信用卡卡號
(optional)

Response Body Parameters - Merchant Reference

Name Type Description
affiliateCards Affiliate Card[] 附屬卡號列表

Response Body Parameters - Affiliate Card

Name Type Description
cardType string 卡類
  • 電子發票載具:MOBILE_CARRIER
  • 商家會員卡:{類別名稱需與LINE Pay洽談確認}
cardId string 卡號
  • 電子發票載具:電子發票載具手機條碼
  • 商家會員卡:商家會員卡號
         

Response

{
  "returnCode": "0000",
  "returnMessage": "success",
  "info": {
    "transactionId": "2019010112345678910",
    "orderId": "20140101123456789",
    "transactionDate": "2019-01-01T01:01:00Z",
    "payInfo": [
      {
        "method": "BALANCE",
        "amount": 10
      },
      {
        "method": "DISCOUNT",
        "amount": 5
      }
    ],
    "balance": 9900,
    "merchantReference": {
      "affiliateCards": [
        {
          "cardType": "MOBILE_CARRIER",
          "cardId": "/RRJFVKQ"
        },
        {
          "cardType": "{MY_CARD}",
          "cardId": "M35812649"
        }
      ]
    }
  }
}