Integrate Ipass QRCode Search
Description
IPASS 線下支付 已請款交易紀錄查詢
IPASS 金流參數:iPass-MerchantId(IPASS特店代號)、KEY(IPASS提供)、IV(IPASS定義為隨機碼, 由系統自行產生)
情境:
- 依廠商金流參數設定進行付款:金流參數(merchant_id、key)為必填、門市代碼不需要填
- 依全通路金流參數設定進行付款:門市代碼為必填、金流參數(merchant_id、key)不需要填
Resource
GET /v1/payment/integrate/search
Authorization
採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login。
Query Parameters
| Name | Type | Description |
|---|---|---|
| type | string | 付款方式,請輸入 IPASS_QRCODE_PAY |
| request | Request | 請求參數 |
| store_id | string | 門市代碼 (optional) |
Query Parameters - Request
| Name | Type | Description |
|---|---|---|
| merchantid | string | Ipass特店代號 (optional) |
| key | string | Ipass特店金鑰 (optional) |
| req_id | string | 序列號,為唯一值 (使用UUID) 長度限制 36 |
| order_number | string | 訂單編號(商家交易的唯一 ID) |
Request
curl --location --globoff 'http://127.0.0.1:5000/v1/payment/integrate/search?type=IPASS_QRCODE_PAY&request={%0A%20%20%20%20%22merchantid%22%3A%20%22wixtar_test%22%2C%0A%20%20%20%20%22key%22%3A%20%2224587D15F3025BFD2F037A36824847E99E0A8EDFF11911AC39112689AF77A7AC%22%2C%0A%20%20%20%20%22req_id%22%3A%20%22ddb720f3-ae7b-4c1a-cb8c-6c0f332fa8a2%22%2C%0A%20%20%20%20%22order_number%22%3A%20%2200003025101300002%22%0A%20%20}' \
--header 'Authorization: Bearer JtUgk1eOigrvj0BqdhMlaGqJJvolKec3stmGcnkAyGs2huBw0efboIEDiqrh+FBl5VIoFCjLXyOoWFjcvIvABOWR2Tu1yDFLMgLvWIfWAOjBdvFWCri1SU+oK86kwEA+eQbCqzWtQ7SEI2LsVKcKmWHG2S/CGXYTQpdMLjaxktBdgBXl4kNURHLyY2Y6xedrCbtlDEhh3nLGLm48myaH9PWzrZ8i4g/37ZY85/WU0hRtfTLF3x8+t2rXbivz1kZWZqSWy1Qu39EcqdEY9u3s6IZ0Q9WTCtu/imdsbFvZPfEPw9YRuNBmr3U1XbGY10OS2Q1ViinwmOQ/hSvVeQl91s/84YncjkUbcFwD7WLB+SswkUyIUssDae0qZzmxecbK8hmb7/nNeUiaKNb9vrce0w=='
Response Body Parameters
| Name | Type | Description |
|---|---|---|
| Data | Data | 資料物件 |
| IV | string | 該次請求回覆使用的IV |
| MAC | string | 該次請求回覆安控物件 |
Response Body Parameters data
| Name | Type | Description |
|---|---|---|
| returnCode | string | 結果代碼,0000為成功 (IPASS) |
| returnMsg | string | 結果訊息或失敗理由 (IPASS) |
| reqId | string | 同 request req_id |
| transactionDateTime | string | 依 UTC+8 時區。格式 : YYYY-mm-dd HH:mm:ss (optional) |
| originalTransactionId | string | 一卡通交易序號 (optional) |
| payStatus | string (enum) | 1:請款完成 2:已全額退款 3:部分退款 (optional) |
| productDesc | string |
商品描述(同支付情求時POS端提供資料) (optional) |
| paymentType | string (enum) |
付款方式 ALLOWED VALUES:
(optional) |
| amount | string | 交易金額 |
| refundList | ReFundList | 若payStatus為2、3 則會有此內容 (optional) |
| orderNumber | string | 訂單編號(商家交易的唯一ID) 長度限制 30 (optional) |
| electronicInvoiceCarrier | string | 若消費者有綁定電子發票載具即回傳,若無回傳空值 (optional) |
Request Body Parameters - ReFundList
| Name | Type | Description |
|---|---|---|
| refundTransactionId | string | 一卡通端退費交易序號 |
| refundTransactionDateTime | string | 依 UTC+8 時區。 格式 : YYYY-mm-dd HH:mm:ss |
| refundAmount | integer | 退費金額 |
Response
查詢成功
200
{
"Data": {
"transactionDateTime": "2025-10-09 18:04:54",
"originalTransactionId": "e3036604969108",
"payStatus": "1",
"productDesc": "挽肉與米 定食 SET",
"paymentType": "1",
"amount": 30,
"orderNumber": "00003025052600013",
"electronicInvoiceCarrier": "/NP3943S",
"refundList": [],
"returnCode": "0000",
"returnMsg": "成功",
"reqId": "ddb720f3-ae7b-4c1a-cb8c-6c0f332fa8a2"
},
"IV": "D19DC6E7F5A9A25E61FF7ED0B44F4DC4",
"MAC": "F8F45114357B57C0819E648FF1420958"
}
200
{
"Data": {
"transactionDateTime": "2025-10-13 09:31:15",
"originalTransactionId": "e3041851969147",
"payStatus": "2",
"productDesc": "挽肉與米 定食 SET",
"paymentType": "1",
"amount": 30,
"orderNumber": "00003025101300002",
"electronicInvoiceCarrier": "/NP3943S",
"refundList": [
{
"refundTransactionId": "R266820251013093430837",
"refundTransactionDateTime": "2025-10-13 09:34:30",
"refundAmount": 30
}
],
"returnCode": "0000",
"returnMsg": "成功",
"reqId": "ddb720f3-ae7b-4c1a-cb8c-6c0f332fa8a2"
},
"IV": "36DE378A39AD9334006E6BCA855114DE",
"MAC": "87319FFAB3D9B8284D159336900B66AB"
}
查詢失敗
200
{
"return_code": "9999",
"return_msg": "發生未預期錯誤",
"message_from": "IPASS"
}
200
{
"Data": {
"returnCode": "0018",
"returnMsg": "orderNumber不存在",
"reqId": "ddb720f3-ae7b-4c1a-cb8c-6c0f332fa8a2"
},
"IV": "73F4DCA036C92643E4CF2F4FCD9C117B",
"MAC": "47BDC4347AD47133043BB1299DCA6B14"
}