Scan2Pay
  • Scan2Pay API
  • API通用規則說明
    • API環境
    • API資料傳輸加解密
    • API Request資料格式
    • API Response資料格式
    • SDK
  • API規格說明
    • 消費者主掃
    • 消費者被掃
    • 信用卡授權
    • 悠遊卡操作
      • 取得裝置清單
      • 登入
      • 卡號查詢
      • 餘額查詢
      • 卡片扣款
      • 卡片退款
      • 結帳
      • 重試交易(悠遊卡)
    • 退款
    • 部分退款
    • 單筆交易查詢
    • 多筆交易查詢
    • 新版多筆交易查詢
    • 電子發票查詢
    • 交易訂單取消
  • 交易結果通知
  • 附錄
    • 支付平台代碼表
    • Scan2Pay交易結果代碼表
    • 悠遊卡交易結果代碼表
    • 悠遊卡交易資訊列印
    • 讀卡機設定
    • 發票API
  • Scan2Pay SSO API
  • API規格說明
    • 取得授權
    • 獲取token
    • 確認token
    • 取得用戶資料
Powered by GitBook
On this page
  • Request
  • Header
  • Data
  • Response
  • Header
  • Data
  • API Example
  • Request
  • Response
  1. API規格說明
  2. 悠遊卡操作

取得裝置清單

DeviceQuery - 讀取特店帳號下綁定的讀卡機資訊

Request

Header

欄位

必填

型別

範例

描述

Method

YES

String(5)

31800

支付方式, 悠遊卡使用31800

ServiceType

YES

String

DeviceQuery

服務代碼

MchId

YES

String

Account0001

特店帳號

TradeKey

YES

String

sha256...hash

交易密碼(sha256編碼)

CreateTime

YES

String

20180101120000

建立日期, yyyyMMddHHmmss

Data

欄位

必填

型別

範例

描述

DeviceId

YES

String

00000000

固定帶入00000000

Retry

YES

String

0

重試次數, 請帶入0

Response

Header

欄位

型別

範例

說明

StatusCode

String(4)

0000

StatusDesc

String

交易成功

交易結果描述

Method

String(5)

31800

支付方式 (悠遊卡為31800)

ServiceType

String

DeviceQuery

服務代碼

MchId

String

Account0001

特店帳號

ResponseTime

String

20180101120000

回應時間

Data

欄位

型別

範例

說明

DeviceList

JSON Array

見下表說明

裝置(讀卡機)列表

DeviceList 陣列內容

欄位

型別

範例

說明

type

String

ezc

ownerDeviceId

String

01301234

讀卡機機號

batchNumber

String

1

ezcDongleId

String

08100DE0A57E

aesKey

String

f3c013cb...27934

特店帳號下的讀卡機機號綁定, 由intella管理, 需洽詢intella取得讀卡機以及開通設定

此API在讀卡機未上線時仍可正確取得回傳資料

API Example

Request

{
  "Header": {
    "Method": "31800",
    "ServiceType": "DeviceQuery",
    "MchId": "ACCOUNT001",
    "TradeKey": "9af15b33........606529a0",
    "CreateTime": "20170830192428"
  },
  "Data": "{\"DeviceId\":\"00000000\",\"Retry\":\"0\"}"
}

Response

{
  "Header": {
    "StatusCode": "0000",
    "StatusDesc": "STATUS_SUCCESS",
    "Method": "31800",
    "ServiceType": "DeviceQuery",
    "MchId": "ACCOUNT001",
    "ResponseTime": "20170830192427"
  },
  "Data": {
    "DeviceList": [
      {
        "type": "ezc",
        "ownerDeviceId": "12341234",
        "batchNumber": 9,
        "ezcDongleId": "0C100DE0A57E",
        "aesKey": "2fb7....4786"
      }
    ]
  }
}
Previous悠遊卡操作Next登入

Last updated 2 months ago

交易結果代碼