交易订单查询
用于获取交易数据,以及查询订单详情用来勾兑交易状态。
Content-Type: application/json; charset=UTF-8 ❌
Content-Type: application/json ✅
请求参数
POST
名称 | 类型 | 长度 | 必填 | 签名 | 描述 |
---|---|---|---|---|---|
merchantNo | String | 20 | Yes | Yes | 商户号。 商户注册时, OnerWay 会为商户创建商户号 |
merchantTxnIds | String | / | No | Yes | 商户交易订单号,可以是多个,以逗号分隔, |
transactionIds | String | / | No | Yes | Onerway交易订单号,可以是多个,以逗号分隔 |
txnTypes | String | / | No | Yes | 交易类型,可以是多个,用逗号分隔。 |
startTime | String | / | No | Yes | 交易开始时间,格式为yyyy-MM-dd HH:mm:ss |
endTime | String | / | No | Yes | 交易结束时间,格式为 yyyy-MM-dd HH:mm:ss 。 最长间隔为 90 天。 |
current | String | / | Yes | Yes | 查询的当前页码 |
sign | String | / | Yes | No | 签名字符串,请参阅签名接口 |
请求参数中,merchantTxnIds
、transactionIds
、startTime
和endTime
三者必须上送一个。
响应参数
名称 | 类型 | 签名 | 描述 |
---|---|---|---|
respCode | String | No | 来自 Onerway 的响应码 |
respMsg | String | No | 来自 Onerway 的响应信息 |
data | Map | No | 响应数据。 请参阅对象 Page |
Page
名称 | 类型 | 必填 | 描述 |
---|---|---|---|
content | List | Yes | 交易信息列表,请参阅对象 TxnInfo |
current | String | Yes | 查询当前页码,每页10 条记录 |
size | String | Yes | 当前页大小 |
totalPages | String | Yes | 总页数 |
totalElements | String | Yes | 总条数 |
TxnInfo
名称 | 类型 | 必填 | 描述 |
---|---|---|---|
transactionId | String | Yes | Onerway 创建的交易订单号,对应商户订单号 |
merchantTxnId | String | Yes | 商户创建的商户交易订单号, 不同的订单号视为不同的交易 |
txnTime | String | Yes | 交易完成时间 |
originTransactionId | String | Yes | 来自 Onerway 的原交易订单号。 |
productType | String | Yes | 产品类型,请参阅 |
subProductType | String | Yes | 子产品类型,请参阅 |
txnType | String | Yes | 交易类型,请参阅 |
status | String | Yes | 交易处理结果。 请参阅 |
reason | String | Yes | 交易失败原因 |
paymentMethod | String | Yes | 具体支付方式,包括卡和本地支付类型 |
walletTypeName | String | Yes | 钱包的品牌名称 |
orderAmount | String | Yes | 订单金额,以“元”为单位。 |
orderCurrency | String | Yes | 交易订单币种。 请参阅 ISO 4217 货币代码 |
txnAmount | String | Yes | 订单金额转换成结算币种后的金额 |
txnCurrency | String | Yes | 结算币种。 请参阅 ISO 4217 货币代码 |
settleRate | String | Yes | 汇率。计算公式:txnAmount = orderAmount * settleRate |
customsDeclarationAmount | String | Yes | 可报关金额 |
customsDeclarationCurrency | String | Yes | 可用于报关的金额对应币种。 请参阅 ISO 4217货币代码 |
arn | String | Yes | ARN |
appId | String | Yes | 商户应用程序ID 。 商户注册网站时,OnerWay 会为商户创建一个应用id |
website | String | Yes | 交易网站 |
cardBinCountry | String | Yes | 卡bin 所属国家 |
cardNumber | String | Yes | 交易卡号 |
userPaymentStatus | String | Yes | 用户支付状态,true :已支付,false :未支付, |
holderName | String | Yes | 持卡人姓名 |
eci | String | Yes | 责任转移 |
creditCard | Object | Yes | 信用卡信息。请参阅 |
tokenId | String | Yes | 订阅/绑卡令牌ID ,订阅/绑卡交易返回 |
contractId | String | Yes | 订阅合同ID ,订阅交易返回 |
txnTimeZone | String | Yes | 交易时区 |
merchantTxnOriginalId | String | Yes | 商户原始交易订单号,与请求参数字段同名 |
VerificationResult
名称 | 描述 |
---|---|
version | 3ds 版本 |
authenticationFlow | 3ds 流程 |
chargebackLiability | 3ds 拒付责任; transStatus 为【N ,R 】, chargebackLiability 不可以使用 UNKNOWN |
transStatus | 3ds 交易状态 |
transStatusReason | 3ds 交易状态原因 |
eci | eci |
cvvResult | cvv 验证结果. See CvvResultEnum |
avsFullResult | avs 地址验证服务的结果. See AvsFullResultEnum |
cavvResult | 3ds 认证返回。持卡人认证验证值,用于证明 3D Secure 认证过程中的持卡人身份验证已经成功完成。 |
交易订单查询请求示例
POST
根据 时间 查询交易列表:
json
{
"current": "1",
"endTime": "2024-07-24 00:00:00",
"merchantNo": "800209",
"merchantTxnIds": "",
"sign": "5af39014bb2145e8e52b60e8a27d08079bedc564336da5f2b108527cc1fc22b9",
"startTime": "2024-07-23 00:00:00",
"transactionIds": "1815627803950186496,1815621472153370624",
"txnTypes": ""
}
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
json
{
"respCode": "20000",
"respMsg": "Success",
"data": {
"content": [
{
"transactionId": "1815621472153370624",
"merchantTxnId": "1721712864000",
"txnTime": "2024-07-23 13:34:26",
"originTransactionId": null,
"productType": "CARD",
"subProductType": "DIRECT",
"txnType": "SALE",
"status": "S",
"userPaymentStatus": null,
"cardType": "MASTERCARD",
"paymentMethod": "MASTERCARD",
"orderAmount": "20.00",
"settleRate": "1",
"orderCurrency": "USD",
"txnAmount": "20.00",
"txnCurrency": "USD",
"customsDeclarationAmount": null,
"customsDeclarationCurrency": null,
"arn": null,
"appId": "1739545982264549376",
"website": "https://docs.onerway.com",
"cardBinCountry": "US",
"cardNumber": "222100******7736",
"walletTypeName": null,
"reason": null,
"holderName": "aa bbb",
"eci": null,
"email": "abel.wang@onerway.com"
},
{
"transactionId": "1815627803950186496",
"merchantTxnId": "1721714370000",
"txnTime": "2024-07-23 13:59:35",
"originTransactionId": null,
"productType": "CARD",
"subProductType": "DIRECT",
"txnType": "SALE",
"status": "N",
"userPaymentStatus": null,
"cardType": null,
"paymentMethod": null,
"orderAmount": "100.00",
"settleRate": null,
"orderCurrency": "USD",
"txnAmount": null,
"txnCurrency": null,
"customsDeclarationAmount": null,
"customsDeclarationCurrency": null,
"arn": null,
"appId": "1739545982264549376",
"website": "https://docs.onerway.com",
"cardBinCountry": null,
"cardNumber": null,
"walletTypeName": null,
"reason": null,
"holderName": null,
"eci": null,
"email": "abel.wang@onerway.com"
}
],
"current": "1",
"size": 10,
"totalPages": 1,
"totalElements": 2
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
根据 订单号 查询单笔交易:
json
{
"current": "1",
"endTime": "",
"merchantNo": "800209",
"merchantTxnIds": "",
"sign": "64aaf970c33ed11f6ae8d16dccf3ec30858da3077789a918402ca7d9133bb3cd",
"startTime": "",
"transactionIds": "1826814232868814848",
"txnTypes": ""
}
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
json
{
"respCode": "20000",
"respMsg": "Success",
"data": {
"content": [
{
"transactionId": "1826814232868814848",
"merchantTxnId": "1724381426000",
"txnTime": "2024-08-23 10:50:28",
"originTransactionId": null,
"productType": "CARD",
"subProductType": "DIRECT",
"txnType": "SALE",
"status": "S",
"userPaymentStatus": null,
"cardType": "VISA",
"paymentMethod": "VISA",
"orderAmount": "50.00",
"settleRate": "1",
"orderCurrency": "USD",
"txnAmount": "50.00",
"txnCurrency": "USD",
"customsDeclarationAmount": null,
"customsDeclarationCurrency": null,
"arn": null,
"appId": "1739545982264549376",
"website": "https://docs.onerway.com",
"cardBinCountry": "US",
"cardNumber": "400002******5032",
"walletTypeName": null,
"reason": null,
"holderName": "CL BRW2",
"eci": null,
"email": "test.test@onerway.com"
}
],
"current": "1",
"size": 10,
"totalPages": 1,
"totalElements": 1
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
根据 交易类型 查询退款交易:
json
{
"current": "1",
"endTime": "2024-07-25 00:00:00",
"merchantNo": "800209",
"merchantTxnIds": "",
"sign": "5af39014bb2145e8e52b60e8a27d08079bedc564336da5f2b108527cc1fc22b9",
"startTime": "2024-07-24 00:00:00",
"transactionIds": "",
"txnTypes": "REFUND"
}
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
json
{
"respCode": "20000",
"respMsg": "Success",
"data": {
"content": [
{
"transactionId": "1816005913119956992",
"merchantTxnId": null,
"txnTime": "2024-07-24 15:02:04",
"originTransactionId": "1816005726079164416",
"productType": "CARD",
"subProductType": "DIRECT",
"txnType": "REFUND",
"status": "S",
"userPaymentStatus": null,
"cardType": "MASTERCARD",
"paymentMethod": "MASTERCARD",
"orderAmount": "200.00",
"settleRate": "1",
"orderCurrency": "USD",
"txnAmount": "200.00",
"txnCurrency": "USD",
"customsDeclarationAmount": null,
"customsDeclarationCurrency": null,
"arn": null,
"appId": "1739545982264549376",
"website": null,
"cardBinCountry": null,
"cardNumber": null,
"walletTypeName": null,
"reason": null,
"holderName": null,
"eci": null,
"email": "abel.wang@onerway.com"
}
],
"current": "1",
"size": 10,
"totalPages": 1,
"totalElements": 1
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
根据交易类型调用订单查询接口时,startTime
和 endTime
必传