訂單查詢 Inquiry API

Domain:https://{Please update according to test/production path provided by JKOPAY}/platform/inquiry?platform_order_ids=

Method:GET

說明:電商平台呼叫此 API,查詢該筆電商平台交易序號的付款、退款歷程。

Platform server calls Inquiry API to search platform order transactions’ payment and refund history.

整合流程 (Integration Workflow)

Transaction result inquiry

請求參數 (Request Parameter)

參數名稱
Parameter
資料型態
Data Type
最大長度
Maximum
必要
Required
說明Description
platform_order_ids[]String60Y電商平台端交易序號
最多可以查詢 20 筆交易。
ID of order saved in the platform. Platform can search up to 20 order IDs at a time.

範例 (Example):

GET https://{街口路徑}/platform/inquiry?platform_order_ids=87,88
Content-Type: application/json
API-KEY: 4h0Ms
DIGEST: a0836fefb028ea7493118c8b5eb6752113f552ac8ef35f3cb8cda91808c77188
/*
Secret key='QxN1X'
(hmac(“platform_order_ids=87, 88”))
*/

返回參數 (Response JSON Body)

參數名稱
Parameter
資料型態
Data Type
最大長度
Maximum
說明Description
resultString請參照 API 回覆代碼
(ResponseCode)。
Please refer to API response code (responseCode).
messageString25結果訊息或失敗理由。Result message or reason of error.
result_object fields
transactions[]依 JSON 格式,陣列帶入訂單資
訊。
Provides purchase order information according to JSON format.
platform_order_idString60電商平台端交易序號Online merchant platform order ID.
statusInt請參照 OrderStatusCodePlease refer to orderStatusCode.
tradeNoString25街口端交易序號JKOPAY trade number.
trans_timeString訂單交易時間
格式: YYYY-mm-dd HH:MM:SS
Time of transaction in UTC+8 time zone.
Format: YYYY-mm-dd HH:MM:SS
final_priceString20訂單實際消費金額。Final price of order with payment currency.
redeem_amountString20折抵金額=街口幣折抵+官方街口
券折抵+店家街口券折抵
Redeemed amount(JKO coins & JKO ticket)
transaction.redeem_detailRedeemDyail
redeem_detail.jko_coin_amountdecimal20,0街口幣折抵JKO coin redeem amount
redeem_detail.official_coupon_amountdecimal20,0官方街口券折抵Official coupon redeem amount
redeem_detail.store_coupon_amountdecimal20,0店家街口券折抵Store coupon redeem amount
debit_amountString20付款方式扣款金額(折抵後金
額)。
Payment method debit amount (after deduct JKO coins) with payment currecny.
(final_price = redeem_amount + debit_amount)
invoice_vehicleString20街口帳戶發票載具
maskNoString16付款工具為信用卡時提供卡號前
六後四碼
格式:222222******3333
channel_typeString支付工具
“account”: 儲值帳戶
“bank”: 銀行帳戶
“creditcard”: 信用卡
Pay tool
account : JKOPay account
bank : bank account
credicard
refund_history fields列出退款歷程;依 JSON 格式,
陣列帶入退款資訊。
List refund history; insert refund information according to JSON format.
refund_history.refund_tradeNoString街口端退款交易序號JKOPAY refund trade number.
refund_history.amountString退款金額。Refund amount.
refund_history.redeem_amountString退還折抵金額。Refund redeemed amount.
refund_history.debit_amountString消費者付款方式退款金額。User payment method refund debit amount.
refund_history.timeString退款時間
格式: YYYY-mm-dd HH:MM:SS
Time of refund in UTC+8 time zone.
Format: YYYY-mm-dd HH:MM:SS

範例 (Example):

{
 "result": "000",
 "message": null,
 "result_object":{
 "tranactions":[
      {
          "platform_order_id": "87",
          "status": 0,
          "tradeNo": "J0026910118070413C4",
          "trans_time": "2018-07-01 12:00:00",
          "final_price": "1000",
          "redeem_amount": "300",
          "debit_amount": "700",
          "redeem_detail": {

             "jko_coin_amount": 200,
             "official_coupon_amount": 0,
             "store_coupon_amount": 100,
             },
           "refund_history":[
             {
                 refund_tradeNo": "K0026910118070413C4001",
                 "time": "2018-07-01 12:20:20",
                 "amount": "100",
                 "debit_amount": "70",
                 "redeem_amount": "30",
                 "redeem_detail": {
                     "jko_coin_amount": 20,
                     "official_coupon_amount": 0,
                     "store_coupon_amount": 10,
                     },
             },
             {
                 "refund_tradeNo": " K0026910118070413C4002",
                 "time": "2018-07-01 12:30:20",
                 "amount": "200",
                 "redeem_amount": "60"
                 "debit_amount": "140"
             }
          ]
               
      },
      {
            "platform_order_id": "88",
            "status": 101
       }
     ]
   }
}