聚合收银台
聚合支付:顾客从商家网站或应用程序重定向到支付供应商的托管页面进行支付。
请求参数
POST
名称 | 类型 | 长度 | 必填 | 签名 | 描述 |
---|---|---|---|---|---|
productType | String | 16 | Yes | Yes | 聚合收银台产品类型使用ALL |
聚合收银台请求参数可参考收银台信用卡支付
json
{
// 其他参数请参考收银台信用卡支付
"productType": "ALL"
}
1
2
3
4
2
3
4
响应参数
名称 | 类型 | 描述 |
---|---|---|
respCode | String | 来自 Onerway 的响应码 |
respMsg | String | 来自 Onerway 的响应信息 |
data | Object | 响应数据。 请参阅对象 data |
data
名称 | 类型 | 必填 | 描述 |
---|---|---|---|
transactionId | String | Yes | Onerway 创建的交易订单号,对应商户订单号 |
merchantTxnId | String | Yes | 顾客每次付款的订单号。 |
merchantNo | String | Yes | 商户号。 商户注册时, OnerWay 会为商户创建商户号 |
responseTime | String | Yes | 接口响应时间,格式为 yyyy-MM-dd HH:mm:ss |
txnTime | String | Yes | 交易完成时间,格式为 yyyy-MM-dd HH:mm:ss |
orderAmount | String | Yes | 订单金额。 |
orderCurrency | String | Yes | 交易订单币种。 请参阅 ISO 4217 货币代码 |
txnAmount | String | Yes | 订单金额转换成结算币种后的金额 |
txnCurrency | String | Yes | 结算币种。 请参阅 ISO 4217 货币代码 |
txnTimeZone | String | Yes | 交易时区。 请参阅 ISO 4217 货币代码 |
status | String | Yes | 交易处理结果。 请参阅 |
reason | String | Yes | 交易失败原因 |
redirectUrl | String | Yes | 收银台地址,商家拿到这个地址后,需要重定向打开。 |
sign | String | Yes | 签名字符串,请参阅签名接口 |
contractId | String | Yes | 订阅合同号:区分是哪笔订阅,完成订阅复购的重要参数。通常与tokenId 成对保存。订阅首购成功后返回,订阅复购中使用 |
tokenId | String | Yes | 订阅token :根据买家支付信息生成的支付token ,完成复购的重要参数。订阅首购成功后返回,订阅复购中使用 |
eci | String | Yes | 责任转移,3D Secure 所需参数 |
periodValue | String | Yes | 分期付款期数 |
lpmsType | String | Yes | 本地支付方式,请参阅对象 |
qrCode | String | Yes | 二维码值 |
subscriptionManageUrl | String | Yes | 订阅托管地址,买家可以通过此地址查看订阅订单信息 |
subscriptionsManageUrl | String | Yes | 订阅列表托管地址 |
聚合收银台请求示例
POST
json
{
"merchantNo": "800079",
"merchantTxnId": 670245160,
"merchantTxnTime": null,
"merchantTxnTimeZone": null,
"productType": "ALL",
"subProductType": "DIRECT",
"txnType": "SALE",
"orderAmount": "200",
"orderCurrency": "USD",
"txnOrderMsg": "{\"returnUrl\":\"https:\/\/www.merchant-store-website.com\/\",\"notifyUrl\":\"https:\/\/www.merchant-store-notify.com\/\",\"products\":\"[{\\\"name\\\":\\\"Pro1\\\",\\\"price\\\":\\\"50.00\\\",\\\"num\\\":\\\"2\\\",\\\"currency\\\":\\\"USD\\\"},{\\\"name\\\":\\\"Pro2\\\",\\\"price\\\":\\\"100\\\",\\\"num\\\":\\\"1\\\",\\\"currency\\\":\\\"USD\\\"},{\\\"name\\\":\\\"shipping fee\\\",\\\"price\\\":\\\"10\\\",\\\"num\\\":\\\"1\\\",\\\"currency\\\":\\\"USD\\\",\\\"type\\\":\\\"shipping_fee\\\"},{\\\"name\\\":\\\"discount\\\",\\\"price\\\":\\\"-10\\\",\\\"num\\\":\\\"1\\\",\\\"currency\\\":\\\"USD\\\",\\\"type\\\":\\\"discount\\\"}]\",\"transactionIp\":\"127.0.0.1\",\"appId\":1673591020057956352}",
"shippingInformation": "{\"firstName\":\"xxx\",\"lastName\":\"xxx\",\"phone\":\"13976448789\",\"email\":\"taoyun15@gmail.com\",\"postalCode\":\"35802\",\"address\":\"test\",\"country\":\"US\",\"province\":\"AS\",\"city\":\"city\",\"street\":\"Amsterdam Ave\",\"number\":10,\"identityNumber\":\"717.628.937-97\"}",
"billingInformation": "{\"firstName\":\"xxx\",\"lastName\":\"xxx\",\"phone\":\"13976448789\",\"email\":\"taoyun15@gmail.com\",\"postalCode\":\"35802\",\"address\":\"test\",\"country\":\"US\",\"province\":\"AS\",\"city\":\"city\",\"street\":\"Amsterdam Ave\",\"number\":10,\"identityNumber\":\"717.628.937-97\"}",
"sign": "99e14fa4b69c5e78e502fefb34870d1e21eac4cb108144168afe6ae9b0fdf619"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
json
{
"data": {
"transactionId": "1810968449028329472",
"merchantTxnId": "670245160",
"merchantNo": "800079",
"responseTime": "",
"txnTime": "",
"orderAmount": "200.00",
"orderCurrency": "USD",
"txnAmount": "",
"status": "U",
"redirectUrl": "https://sandbox-checkout.onerway.com/aggregate?key=f79a2b0782294ed7a445c792444f99dd",
"sign": "",
"contractId": ""
},
"respCode": "20000",
"respMsg": "Success"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
顾客支付完成示例
json
https://www.merchant-store-website.com/?transactionId=1810968449028329472&merchantTxnId=670245160&merchantNo=800079&responseTime=2024-07-10%2017:26:40&txnTime=2024-07-10%2017:26:23&txnTimeZone=+08:00&orderAmount=200.00&orderCurrency=USD&txnAmount=200.00&txnCurrency=USD&status=S&reason=Payment%20successful&eci=5
1
json
{
"notifyType": "TXN",
"transactionId": "1810968449028329472",
"txnType": "SALE",
"merchantNo": "800079",
"merchantTxnId": "670245160",
"responseTime": "2024-07-10 17:26:40",
"txnTime": "2024-07-10 17:26:23",
"txnTimeZone": "+08:00",
"orderAmount": "200.00",
"orderCurrency": "USD",
"txnAmount": "",
"status": "S",
"eci": "5",
"reason": "{\"respCode\":\"20000\",\"respMsg\":\"Success\"}",
"sign": "c42b40a3117de9dc35c93060c3df0d48a4fe95aed12ffece1198cb2569ca04d6",
"paymentMethod": "VISA"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
指定本地支付方式
名称 | 类型 | 长度 | 签名 | 描述 |
---|---|---|---|---|
lpmsInfo | String | / | Yes | 用来指定使用哪个本地支付方式。格式为json 字符串。 |
商户可通过 lpmsInfo
指定收银台展示的支付方式
例如:
json
{
// 通过 lpmsInfo 指定收银台展示的支付方式,其他请求参数参考收银台信用卡支付
"lpmsInfo": "{\"lpmsType\":\"OXXO\",\"bankName\":\"\",\"iban\":\"\"}"
}
1
2
3
4
2
3
4
则收银台上只展示 OXXO
这一种本地支付,其余的本地支付、信用卡支付都不会展示。
LpmsInfo
名称 | 类型 | 长度 | 必填 | 描述 |
---|---|---|---|---|
lpmsType | String | 64 | Yes | 本地支付方式。 请参阅 LpmsTypeEnum。 |
bankName | String | 128 | No | 银行名称,某些本地支付方式需要。lpmsType 为EFT 时请参阅 。lpmsType 为Przelewy24 时请参阅 Przelewy24BankNameEnum。 |
iBan | String | 64 | No | 银行账户,部分地区转账时需要 |
walletAccountId | String | / | No | 钱包/本地账户id,部分地区转账时需要。场景如下: 1.当 productType 为 LPMS ,并且 lpmsType 为 ATM_CARD 时必填,此时需传送本地银行账户号。2.当 productType 为 PAYMENT_CODE 时必填,此时需传送钱包付款码 |
walletAccountName | String | / | No | 钱包/本地账户名称,部分地区转账时需要。当 productType 为 LPMS ,并且 lpmsType 为 ATM_CARD 时必填,此时需传送本地银行账户名称。 |
prepaidNumber | String | / | No | 预付费卡号,部分支付方式需要 |
收银台指定支付方式示例
POST
以 SEPADD
为例,指定收银台只展示 SEPADD
本地支付方式。
json
{
"billingInformation": "{\"country\":\"NL\",\"email\":\"abel.wang@onerway.com\",\"firstName\":\"CL\",\"lastName\":\"BRW2\",\"phone\":\"17700492982\",\"address\":\"Apt. 870\",\"city\":\"Hayward\",\"postalCode\":\"66977\",\"identityNumber\":\"12345678\"}",
"lpmsInfo": "{\"lpmsType\":\"SEPADD\"}", // 本地支付
"merchantCustId": 1720680372000,
"merchantNo": "800209",
"merchantTxnId": 1720680372000,
"merchantTxnTime": "2024-01-30 07:10:51",
"merchantTxnTimeZone": "+08:00",
"orderAmount": "10",
"orderCurrency": "USD",
"productType": "ALL",
"shippingInformation": "{\"country\":\"NL\",\"email\":\"abel.wang@onerway.com\",\"firstName\":\"CL\",\"lastName\":\"BRW2\",\"phone\":\"17700492982\",\"address\":\"Apt. 870\",\"city\":\"Hayward\",\"postalCode\":\"66977\",\"identityNumber\":\"12345678\"}",
"sign": "17ec7ed3adb9141062da2177eedc69b7cbcfde041107da12885c48c50c15a10f",
"subProductType": "DIRECT",
"txnOrderMsg": "{\"returnUrl\":\"https://docs.onerway.com/\",\"products\":\"[{\\\"price\\\":\\\"110.00\\\",\\\"num\\\":\\\"1\\\",\\\"name\\\":\\\"iphone11\\\",\\\"currency\\\":\\\"CNY\\\"}]\",\"transactionIp\":\"127.0.0.1\",\"appId\":\"1739545982264549376\",\"javaEnabled\":false,\"colorDepth\":\"24\",\"screenHeight\":\"1080\",\"screenWidth\":\"1920\",\"timeZoneOffset\":\"-480\",\"accept\":\"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9\",\"userAgent\":\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36\",\"contentLength\":\"340\",\"language\":\"zh-CN\"}",
"txnType": "SALE"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
json
{
"respCode": "20000",
"respMsg": "Success",
"data": {
"transactionId": "1811290882969047040",
"merchantTxnId": "1720680372000",
"merchantNo": "800209",
"responseTime": "",
"txnTime": "",
"orderAmount": "10.00",
"orderCurrency": "USD",
"txnAmount": "",
"txnCurrency": null,
"txnTimeZone": null,
"status": "U",
"reason": null,
"redirectUrl": "https://sandbox-checkout.onerway.com/aggregate?key=5c450e93737c4db0ad3c3c9e71f963da",
"sign": "92ce7d94d74039dc50f124309e5d5fe059210cebe428ccc27ca73c112eb66f82",
"contractId": "",
"tokenId": null,
"eci": null,
"transactionOrderNo": null,
"periodValue": null,
"lpmsType": null,
"qrCode": null
}
}
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
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
若请求成功,商家需要获取响应参数中的redirectUrl,然后进行重定向打开。