Onerway
POST

查询交易记录

使用此接口按交易类型、交易状态、卡片 ID 和时间范围查询卡交易记录。

请求

ApiKey
Onerway 分配的发卡 API key 请求 Header。
示例:
txnType
交易类型筛选条件。
可选值
AUTHORIZATION
授权交易。
REVERSAL
撤销交易。
CLEARING
清算交易。
txnStatus
交易状态筛选条件。
可选值
S
成功。
F
失败。
P
处理中。
cardId
卡片 ID 筛选条件。
示例:
startTime
查询开始时间,UTC 秒级时间戳。
示例:
endTime
查询结束时间,UTC 秒级时间戳。
示例:
pageNum
页码。
示例:
约束
范围
1
pageSize
每页条数。
示例:
约束
范围
1100

请求示例

curl -X POST 'https://sandbox-api.onerway.com/api/v1/merchant/queryTxnList' \
  -H 'ApiKey: replace_with_issuing_api_key' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "cardId": "100001",
  "pageNum": 1,
  "pageSize": 10,
  "txnType": "AUTHORIZATION"
}'

响应

respCode
业务响应码;20000 表示成功。
respMsg
响应信息。
分页交易记录。

响应示例

{
  "respCode": "20000",
  "respMsg": "success",
  "data": {
    "totalRecords": 1,
    "pageSize": 10,
    "current": 1,
    "pageNum": 1,
    "totalPages": 1,
    "records": [
      {
        "txnType": "AUTHORIZATION",
        "txnStatus": "S",
        "txnOrderNo": "TXN20260101001",
        "originTxnOrderNo": null,
        "originTxnOrderNoForRefund": null,
        "cardId": "100001",
        "authTime": 1735689600000,
        "authorizationCode": "AUTH001",
        "authMessageDesc": "Approved",
        "transactionAmount": 50,
        "transactionCurrency": "USD",
        "transactionTime": 1735689600000,
        "cardAmount": 50,
        "cardCurrency": "USD",
        "settleAmount": 50,
        "settleCurrency": "USD",
        "settleTime": 1735776000000,
        "transactionFee": 0.5,
        "transactionFeeCurrency": "USD",
        "crossBorderFee": null,
        "crossBorderFeeCurrency": null,
        "exchangeFee": null,
        "exchangeFeeCurrency": null,
        "merchantId": "example_merchant_id",
        "merchantName": "Example Merchant",
        "merchantCountry": "United States",
        "merchantCountryCode": "US",
        "merchantStateProvince": "WA",
        "merchantCity": "Seattle",
        "merchantPostalCode": "98101",
        "merchantMccCode": "5411"
      }
    ]
  }
}
该接口暂未记录错误响应。