Checkout payment
跳转支付
V2022-03/checkout-payment,获取跳转URL接口
网关号
请求id,30分钟之内唯一
时间戳,以毫秒(ms)为单位,请求误差不能超过10分钟
验签字段,具体加签方式请参阅数据签名过程章节
服务端异步通知地址;最小长度为1,最大长度为1000,如:https://www.my.shopify.com/callbackUrl
https://www.my.shopify.com/callbackUrl
客户在商户端的标识ID;最大长度为100,如:cus_1420997690607206400
cus_1420997690607206400
客户端类型; 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
支付页面上优先展示的支付方式,默认:Credit Card;最大长度为100,如:Credit Card
Credit Card
是否只展示优先指定的支付方式,true:只展示指定的支付方式,false:展示全部支付方式,默认:false
false
平台标识名称; 如果商户是SaaS平台,则必填;最大长度为100,如:Shopify
Shopify
订单备注;最大长度为500,如:remark
remark
交易完成页面跳转地址;最小长度为1,最大长度为1000,如:https://www.my.shopify.com/redirectUrl
https://www.my.shopify.com/redirectUrl
POST /V2022-03/checkout/payment HTTP/1.1
Host: {paymentapiurl}
gateway-no: null
request-id: null
request-time: null
sign-info: null
Content-Type: application/json
Accept: */*
Content-Length: 795
{
"billingAddress": {
"address": "Address of Maryland",
"city": "Maryland",
"country": "US",
"email": "abc@mail.com",
"firstName": "asia",
"lastName": "bill",
"phone": 13212344321,
"state": "MD",
"zip": 21133
},
"callbackUrl": "https://www.my.shopify.com/callbackUrl",
"customerId": "cus_1420997690607206400",
"deliveryAddress": {
"shipAddress": "Address of Maryland",
"shipCity": "Maryland",
"shipCountry": "US",
"shipFirstName": "asia",
"shipLastName": "bill",
"shipPhone": 13212344321,
"shipState": "MD",
"shipZip": 21133
},
"goodsDetails": [
{
"goodsCount": 2,
"goodsPrice": 100,
"goodsTitle": "iphone"
}
],
"isMobile": 0,
"orderAmount": 100.99,
"orderCurrency": "USD",
"orderNo": 12167001000000000000,
"paymentMethod": "Credit Card",
"paymentMethodFilter": "false",
"platform": "Shopify",
"remark": "remark",
"returnUrl": "https://www.my.shopify.com/redirectUrl"
}
OK
{
"code": "success",
"message": "message response",
"data": {
"orderAmount": 100,
"orderCurrency": "USD",
"orderInfo": "is order info",
"orderNo": 12167001000000000000,
"orderStatus": "success",
"redirectUrl": "http://192.168.2.23:7080/services/v3/RedirectResultTest",
"remark": "remark",
"tradeNo": "2022022416544064513805"
}
}
跳转支付请求报文示例
curl --request POST \
--url https://{paymentApiUrl}/V2022-03/checkout/payment \
--header 'Content-Type: application/json' \
--header 'request-id: 58675' \
--header 'request-time: 1651888520935' \
--header 'gateway-no: 12345001' \
--header 'sign-info: 787966BF2479A1BE8E1886CD18E6919447FAF4F357E7056188D4F035661B822B' \
--data '{
"billingAddress": {
"address": "4348 Calico Drive",
"city": "NEWARK VALLEY",
"country": "US",
"email": "indubio@gmail.com",
"firstName": "Di Mo",
"lastName": "Shi",
"phone": "509-675-8948"
"state": "NY",
"zip": "13811"
},
"callbackUrl": "https://CallResult",
"customerId": "",
"deliveryAddress": {
"shipAddress": "4348 Calico Drive",
"shipCity": "NEWARK VALLEY",
"shipCountry": "US",
"shipFirstName": "Di Mo",
"shipLastName": "Shi",
"shipPhone": "509-675-8948",
"shipState": "NY",
"shipZip": "13811"
},
"goodsDetails": [
{
"goodsCount": "1000",
"goodsPrice": "139",
"goodsTitle": "Ipad min"
}
],
"isMobile": "0",
"orderAmount": "336.73",
"orderCurrency": "USD",
"orderNo": "NEW_API2520767716960",
"paymentMethod": "Credit Card",
"platform": "",
"remark": "TEST",
"returnUrl": "https://returnUrl"
}'
结果对象属性描述
code
String
返回码
message
String
返回信息
data
Object
数据对象
redirectUrl
String
checkout模式下商户跳转客户的支付页面地址
orderNo
String
商户订单号
tradeNo
String
预下单流水号
orderAmount
String
商户订单金额
orderCurrency
String
商户订单币种
orderStatus
String
【交易状态】
待处理:pending
成功:success
失败:fail
orderInfo
String
银行返回信息
remark
String
备注
Last updated