Confirm charge
支付扣款接口
确认扣款接口
网关号
请求id,30分钟之内唯一
时间戳,以毫秒(ms)为单位,请求误差不能超过10分钟
验签字段,具体加签方式请参阅数据签名过程章节
服务端异步通知地址;最小长度为1,最大长度为1000,如:https://www.my.shopify.com/callbackUrl
https://www.my.shopify.com/callbackUrl
客户ID; 商户可以通过接口/customers发起post创建; 注:tokenType=InitRecurring/Recurring时,为必填项; 最大长度为100; 如:cus_1420997690607206400
cus_1420997690607206400
卡支付ID; 商户可以通过接口/payment_methods发起post创建; 注:tokenType=Recurring时或者非PCI商户,为必填项;customerPaymentMethodId和customerPaymentMethod对象二选一; 如:pm_1420997693836820480
pm_1420997693836820480
客户ip地址;最小长度为1,最大长度为50,如:192.168.0.1
192.168.0.1
客户端类型; 0:web,1:h5,2:app_SDK,3:mini_app(小程序),默认:0;固定长度为1,如:0
商户订单金额; 最多两位小数,注:如果币种最小单位为元,则只能为整数;最小长度为1,最大长度为16,如:100.99
100.99
3位字母的ISO币种代码;固定长度为3,如:USD
USD
商户订单号;最小长度为1,最大长度为50,如:12167001000000000001
12167001000000000000
平台标识名称; 如果商户是SaaS平台,为必填项;最小长度为1,最大长度为10,如:Shopify
Shopify
订单备注;最大长度为500,如:remark
remark
交易完成页面跳转地址;最小长度为1,最大长度为1000,如:https://www.my.shopify.com/redirectUrl
https://www.my.shopify.com/redirectUrl
循环扣款类型; InitRecurring/Recurring,首笔交易:InitRecurring,非首笔交易:Recurring;最大长度为100
商户店铺网址;最小长度为1,最大长度为200,如:https//www.my.shopify.com
https//www.my.shopify.com
优先3D通道,any:任何场景,automatic:自动3D验证
automatic
POST /V2022-03/confirmCharge HTTP/1.1
Host: {paymentapiurl}
gateway-no: null
request-id: null
request-time: null
sign-info: null
Content-Type: application/json
Accept: */*
Content-Length: 954
{
"callbackUrl": "https://www.my.shopify.com/callbackUrl",
"customerId": "cus_1420997690607206400",
"customerPaymentMethodId": "pm_1420997693836820480",
"customerIp": "192.168.0.1",
"customerPaymentMethod": {
"billingDetail": {
"Address": {
"city": "Maryland",
"country": "US",
"line1": "west street",
"postalCode": "21133",
"state": "MD"
},
"email": "abc@mail.com",
"firstName": "asia",
"lastName": "bill",
"phone": 13212344321
},
"card": {
"brand": "Visa",
"cardExpireMonth": null,
"cardExpireYear": null,
"cardNo": null,
"cardSecurityCode": null,
"last4": null
}
},
"goodsDetails": [
{
"goodsCount": 2,
"goodsPrice": 100,
"goodsTitle": "iphone"
}
],
"isMobile": 0,
"orderAmount": 100.99,
"orderCurrency": "USD",
"orderNo": "12167001000000000000",
"platform": "Shopify",
"remark": "remark",
"returnUrl": "https://www.my.shopify.com/redirectUrl",
"shipping": {
"address": 13212344321,
"firstName": "asia",
"lastName": "bill",
"phone": 13212344321
},
"tokenType": null,
"webSite": "https//www.my.shopify.com",
"priorityThreeDSecure": "automatic"
}
OK
{
"code": "success",
"message": "message response",
"data": {
"maskCardNo": "422222********1111",
"orderAmount": "100",
"orderCurrency": "USD",
"orderInfo": "is order info",
"orderNo": "12167001000000000000",
"orderStatus": "success",
"redirectUrl": "https://3desurl.com",
"remark": "remark",
"riskInfos": "is risk info",
"tradeNo": "2022022416544064513805"
}
}
请求报文示例
curl --request POST \
--url https://{paymentApiUrl}/V2022-03/confirmCharge \
--header 'Content-Type: application/json' \
--header 'request-id: 58675' \
--header 'request-time: 1651888520935' \
--header 'gateway-no: 12345001' \
--header 'sign-info: 787966BF2479A1BE8E1886CD18E6919447FAF4F357E7056188D4F035661B822B' \
--data '{
"callbackUrl": "https://sandbox-pay.asiabill.com/services/v3/CallResult",
"customerId": "cus_1526760517237616640",
"customerIp": "192.168.3.27",
"customerPaymentMethodId": "pm_1526760521989763072",
"goodsDetails": [
{
"goodsCount": "1000",
"goodsPrice": "154.23",
"goodsTitle": "apple"
}
],
"isMobile": "0",
"orderAmount": "194.13",
"orderCurrency": "USD",
"orderNo": "NEW_API1916436298025",
"platform": "",
"remark": "TEST",
"returnUrl": "https://sandbox-pay.asiabill.com/services/v3/RedirectResultTest?bankCode=TestBankCode",
"shipping": {
"address": {
"city": "NEWARK VALLEY",
"country": "US",
"line1": "4348 Calico Drive",
"postalCode": "13811",
"state": "NY"
},
"firstName": "Di Mo",
"lastName": "Shi",
"phone": "509-675-8948"
},
"webSite": "www.AsiaBill.com"
}'
结果对象属性描述
code
String
返回码
message
String
返回信息
data
redirectUrl
String
跳转URL(3D验证URL、本地支付跳转URL),如果此值不为空,则商户需要跳转客户到此地址
orderStatus
String
【交易状态】
待处理:pending
成功:success
失败:fail
orderInfo
String
交易状态描述信息
remark
String
备注
tradeNo
String
流水订单号
orderNo
String
商户订单号
orderAmount
String
商户订单金额
orderCurrency
String
商户订单币种
riskInfos
String
风控信息
maskCardNo
String
卡号前六后四
Last updated