预授权下单
预授权是一种金融交易方式,主要用于信用卡支付。在某些情况下,商家需要确保顾客的信用卡有足够的信用额度来支付即将发生的交易。这时,商家会向银行发起预授权请求,银行会暂时冻结顾客信用卡上的一定金额,直到交易完成或取消。
注意
- 预授权分两步,第一步是预授权下单,第二步是预授权扣款
- 请在预授权下单成功后的 3 天内发起预授权扣款
请求参数
POST
名称 | 类型 | 长度 | 必填 | 签名 | 描述 |
---|---|---|---|---|---|
txnType | String | 16 | Yes | Yes | 授权支付使用 AUTH |
预授权下单请求响应示例
POST
json
{
"billingInformation": "{\"country\":\"US\",\"email\":\"abel.wang@onerway.com\",\"firstName\":\"CL\",\"lastName\":\"BRW2\",\"phone\":\"17700492982\",\"address\":\"Apt. 870\",\"city\":\"Hayward\",\"postalCode\":\"66977\",\"identityNumber\":\"717.628.937-97\"}",
"cardInfo": "{\"cardNumber\":\"2221008123677736\",\"cvv\":\"789\",\"month\":\"12\",\"year\":\"2030\",\"holderName\":\"test sandbox\"}",
"merchantNo": "800209",
"merchantTxnId": "1721799203000",
"merchantTxnTime": "2024-07-24 13:33:23",
"merchantTxnTimeZone": "+08:00",
"orderAmount": "200",
"orderCurrency": "USD",
"productType": "CARD",
"shippingInformation": "{\"country\":\"US\",\"email\":\"abel.wang@onerway.com\",\"firstName\":\"CL\",\"lastName\":\"BRW2\",\"phone\":\"17700492982\",\"address\":\"Apt. 870\",\"city\":\"Hayward\",\"postalCode\":\"66977\",\"identityNumber\":\"717.628.937-97\"}",
"sign": "61cbf5a885a782db5e5bcde5eab3248b0fb802eb140723f846c1a9797ead57fe",
"subProductType": "DIRECT",
"txnOrderMsg": "{\"returnUrl\":\"https://www.merchant-store-website.com/\",\"appId\":\"1739545982264549376\",\"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\"}",
"txnType": "AUTH"
}
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": "1815983598810308608",
"responseTime": "2024-07-24 13:33:31",
"txnTime": "2024-07-24 13:33:23",
"txnTimeZone": "+08:00",
"orderAmount": "200.00",
"orderCurrency": "USD",
"txnAmount": null,
"txnCurrency": null,
"status": "S",
"redirectUrl": null,
"contractId": null,
"tokenId": null,
"eci": "00",
"periodValue": null,
"codeForm": null,
"presentContext": null,
"actionType": null,
"sign": "9f67a76835f4913eae68c624602c4504313f611ab146983a50d0fea9533c163b"
}
}
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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
注意
- 请保存响应里的
transactionId
以便后续调用 预授权扣款