Ipass Refund
Description
IPASS 線下支付 退款請求
IPASS 金流參數:iPass-MerchantId(IPASS特店代號)、KEY(IPASS提供)、IV(IPASS定義為隨機碼)
情境:
- 依廠商金流參數設定進行付款:金流參數(merchant_id、key、iv)為必填、門市代碼不需要填
- 依全通路金流參數設定進行付款:門市代碼為必填、金流參數(merchant_id、key、iv)不需要填
Resource
POST /v1/payment/ipass/offline/refund
Authorization
採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login。
Request Body Parameters
| Name | Type | Description |
|---|---|---|
| request | Request | 請求參數 |
| store_id | string | 門市代碼 (optional) |
| is_test | boolean | 是否為測試模式,預設為 false (optional) |
Request Body Parameters - Request
| Name | Type | Description |
|---|---|---|
| merchantid | string | Ipass特店代號 (optional) |
| key | string | Ipass特店金鑰 (optional) |
| iv | string | Ipass偏移植,產生一組 16 個 Byte 的陣列,將 16 個 Byte 各自隨機填入 0~255 數值,將結果轉換成16進制字串。 每次請求皆不同 (optional) |
| req_id | string | 序列號,為唯一值 (使用UUID) 長度限制 36 |
| transaction_id | string | 一卡通交易序號 |
| amount | integer | 支付取消金額(未帶金額全退) |
Request
{
"store_id": "0",
"request": {
"req_id": "3815D6AE-9349-40CF-8990-0000E42AC591",
"transactionId": "IPY202208250340004",
"amount": 229
}
}
Response Body Parameters
| Name | Type | Description |
|---|---|---|
| message | string | 錯誤訊息 (OMNI) (optional) |
| return_code | string | 結果代碼,0000為成功 (IPASS) (optional) |
| return_msg | string | 結果訊息或失敗理由 (IPASS) (optional) |
| req_id | string | 同 request req_id (optional) |
| cancel_transaction_id | string | 一卡通交易序號 (optional) |
| cancel_date_time | string | 依 UTC+8 時區。格式 : YYYY-mm-dd HH:mm:ss (optional) |
| payment_type | string (enum) |
付款方式 1: 電支餘額 2: 信用卡 (optional) |
| message_from | string (enum) |
錯誤訊息來源 ALLOWED VALUES:
(optional) |
| order_number | string | 訂單編號 長度限制 100 |
Response
退款成功
200
{
"cancel_transaction_id": "R362720240903153940900",
"cancel_date_time": "2024-09-03 15:39:40",
"order_number": "IXN20240827000006",
"return_code": "0000",
"return_msg": "成功",
"req_id": "3815D6AE-9349-40CF-8090-0000E45BC595"
}
退款失敗
200
{
"return_code": "9999",
"return_msg": "發生未預期錯誤",
"message_from": "IPASS"
}
200
{
"return_code": "0019",
"return_msg": "transactionId可退金額不足",
"req_id": "3815D6AE-9349-40CF-8090-0000E45BC446",
"message_from": "IPASS"
}
400
{
"message": "呼叫IPASS API錯誤",
"message_from": "OMNI"
}