Appearance
快速开始
接入准备
- 提供一个开户邮箱和测试域名,用于创建沙盒环境测试商户
- 收到邮件后,根据邮件里的链接登入商户客户端,获取商户号、秘钥、appId等关键信息
- 选择合适的接入方式,开始接入
说明
- 邮箱会用来创建沙盒账户
- 我们会给测试域名添加白名单,只有添加了白名单的域名才能调用
Onerway API
- 商户后台的登录信息会发送给开户邮箱,商户号、秘钥、appId等关键信息需登录商户后台获取
首次登录商户后台需重置密码
然后,您可以通过沙盒环境来进行集成,我们鼓励在上线项目之前在沙盒环境中测试API调用。
生产环境和沙盒环境的请求地址仅是域名有所不同。您可以首先在沙盒环境中测试 Onerway API
,这不会影响生产环境中的数据。一旦测试完成,请通过更改请求域名
和其他配置参数(商户号、秘钥、appId)切换到生产环境。
Onerway 请求和响应示例
POST
json
{
"merchantNo": "800079",
"merchantTxnId": 1121633246,
"merchantTxnTime": null,
"merchantTxnTimeZone": null,
"productType": "CARD",
"subProductType": "DIRECT",
"txnType": "SALE",
"orderAmount": "100",
"orderCurrency": "USD",
"txnOrderMsg": "{\"returnUrl\":\"https:\/\/www.ronhan.com\/\",\"products\":\"[{\\\"name\\\":\\\"iphone 11\\\",\\\"price\\\":\\\"40\\\",\\\"num\\\":\\\"2\\\",\\\"currency\\\":\\\"USD\\\"},{\\\"name\\\":\\\"macBook\\\",\\\"price\\\":\\\"20.00\\\",\\\"currency\\\":\\\"USD\\\"},{\\\"name\\\":\\\"discount\\\",\\\"price\\\":\\\"-10.00\\\",\\\"currency\\\":\\\"USD\\\",\\\"type\\\":\\\"discount\\\"},{\\\"name\\\":\\\"shipping fee\\\",\\\"price\\\":\\\"10.00\\\",\\\"currency\\\":\\\"USD\\\",\\\"type\\\":\\\"shipping_fee\\\"}]\",\"transactionIp\":\"127.0.0.1\",\"appId\":1673591020057956352,\"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\":null}",
"cardInfo": "{\"cardNumber\":\"4000027891380961\",\"cvv\":\"456\",\"month\":\"12\",\"year\":\"2024\",\"holderName\":\"CL BRW2\"}",
"shippingInformation": "{\"firstName\":\"Eric\",\"lastName\":\"Canela\",\"phone\":\"3114899788\",\"email\":\"Gabekcanlea@gmail.com\",\"postalCode\":\"90047\",\"address\":\"Aehitment 2, 1256 W Flooeioece Aye\",\"country\":\"US\",\"province\":\"AS\",\"city\":\"Los Angeles\"}",
"billingInformation": "{\"firstName\":\"Eric\",\"lastName\":\"Canela\",\"phone\":\"3114899788\",\"email\":\"Gabekcanlea@gmail.com\",\"postalCode\":\"90047\",\"address\":\"Aehitment 2, 1256 W Flooeioece Aye\",\"country\":\"US\",\"province\":\"AS\",\"city\":\"Los Angeles\"}",
"sign": "ef803e92ba89b70ffbe5bc9bacc516e84fd5524854ff61845d3de8f720704f69"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
json
{
"respCode": "20000",
"respMsg": "Success",
"data": {
"transactionId": "1742463301465800704",
"responseTime": "2024-01-03 16:30:01",
"txnTime": "2024-01-03 16:29:59",
"txnTimeZone": "+08:00",
"orderAmount": "100.00",
"orderCurrency": "USD",
"txnAmount": null,
"txnCurrency": null,
"status": "S",
"redirectUrl": null,
"contractId": null,
"tokenId": null,
"eci": null,
"periodValue": null,
"codeForm": null,
"presentContext": null,
"redirectType": null,
"sign": "fac37b729b55313e48438b45ea490c5731d4078d5bcd9ca3a67b8085c5f5c132"
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
不同的 API 针对不同的支付场景进行了设计。请根据您的支付收款业务使用特定的 API。我们还提供通知,当支付处理达到最终的成功或失败状态时,将支付结果发送给商家。