H5支付
H5支付
接口地址
http://xipay.xiangma365.com/api/openpay/v3/h5pay
请求方式
POST
请求头部
Content-Type:application/json
请求参数
参数 | 类型 | 必填 | 描述 | 示例 |
---|---|---|---|---|
inst_no | string | Y | 机构号 ,通道分配 | 60000001 |
mch_no | string | Y | 商户号 | Y52212200002 |
pay_type | string | Y | 支付类型:300 支付宝,400 微信,600 云闪付 | 400 |
pay_trace_no | string | Y | 请求流水号(在商户系统内唯一) | werddtuoji0988 |
pay_time | string | Y | 支付请求时间,yyyyMMddHHmmss格式 | 20880907150901 |
total_amount | string | Y | 支付金额,单位:分 | 1 |
open_id | string | N | 用户标识:微信openid/支付宝userid | afcdasdasdasd3213dxdasdad |
notify_url | string | N | 回调地址(无须ecode) | http://open.sh.com |
sign | string | Y | 签名字符串 | 920ff5b412adb411c6648948f2212fb9 |
请求示例(微信)
{
"inst_no": "60000001",
"mch_no": "Y52212190001",
"pay_time": "20230306235318",
"pay_trace_no": "998877665544332018",
"pay_type": "400",
"total_amount": "1",
"sign": "fcc3e513f87aa8c92eaff6ead4bf652a"
}
响应参数
参数 | 类型 | 必填 | 描述 | 示例 |
---|---|---|---|---|
return_code | string | Y | 响应码:SUCCESS成功,FAIL失败,响应码仅代表通信或参数 | SUCCESS |
result_code | string | Y | 业务结果:PAY_SUCCESS 支付成功 ,PAY_IN_PROCESS 支付中 ,PAY_FAIL 支付失败,只有在return_code为SUCCESS时才会返回。 | PAY_SUCCESS |
return_msg | string | Y | 返回信息提示,“支付成功”,“支付中”,“参数不合法” 等 | 支付成功 |
pay_type | string | Y | 支付类型:300支付宝,400微信,600云闪付 | 300 |
mch_name | string | Y | 商户名称 | 小猫生活 |
shop_name | string | 门店名称 | 小猫生活 | |
mch_no | string | Y | 商户号 | 851811130002 |
shop_no | string | 门店号 | 86000033007 | |
pay_trace_no | string | Y | 请求流水号(必须在商户系统内唯一) | 51c7d68424e5492199cf7f4734a2b977 |
pay_time | string | Y | 请求交易时间,格式yyyyMMddHHmmss | 20181116155621 |
total_amount | string | Y | 支付金额,单位:分 | 100 |
trade_no | string | Y | 订单号 | 20000002814118090716435200001 |
appId | object | 微信公众号支付返回字段,公众号appId | appIdXXX | |
timeStamp | object | 微信公众号支付返回字段,时间戳,部分系统取到的值为毫秒级,需要转换成秒(10位数字) | 1414561699 | |
nonceStr | object | 微信公众号支付返回字段,随机字符串 | 1234 | |
packages | object | 微信公众号支付返回字段,支付参数 | prepay_id=123456789 | |
signType | object | 微信公众号支付返回字段,签名方式 | MD5,RSA | |
paySign | object | 微信公众号支付返回字段,签名 | ||
ali_trade_no | object | 支付宝JSAPI支付返回字段用于调起支付宝JSAPI | ||
attach | string | 附加字段,原样返回 | 1234 | |
code_url | string | 跳转到该地址即可发起支付,与原生参数不同时返回 | ||
sign | string | Y | 签名 | 336437c53711dd466154c4162cbe1c52 |
响应示例(微信)
{
"return_code": "SUCCESS",
"return_msg": "H跳小程序预支付成功",
"result_code": "PAY_SUCCESS",
"pay_type": "400",
"mch_name": "升宝百货",
"shop_name": "",
"mch_no": "Y52212190001",
"shop_no": "",
"pay_trace_no": "998877665544332018",
"pay_time": "20230306235318",
"total_amount": "1",
"trade_no": "200001102F4623030615082110001",
"appId": null,
"timeStamp": null,
"nonceStr": null,
"packages": null,
"signType": null,
"paySign": null,
"ali_trade_no": null,
"attach": null,
"code_url": "https://pay.congmingpay.com/pay/scene/h5tominiapp_new.html?order_id=h5_20230306151092052057",
"sign": "0f5b7844803224becb87f2b6518dbf97"
}
响应示例(支付宝)
{
"return_code": "SUCCESS",
"return_msg": "公众号支付请求成功",
"result_code": "PAY_SUCCESS",
"pay_type": "300",
"mch_name": "升宝百货",
"shop_name": "",
"mch_no": "Y52212190001",
"shop_no": "",
"pay_trace_no": "998877665544332019",
"pay_time": "20230306235318",
"total_amount": "1",
"trade_no": "200001102F3323030620075610002",
"appId": null,
"timeStamp": null,
"nonceStr": null,
"packages": null,
"signType": null,
"paySign": null,
"ali_trade_no": null,
"attach": null,
"code_url": "https://pay.congmingpay.com/pay/buypay.do?shopId=5907536da7c0c3448df3eb8c3d57ee0c&money=0.01&orderId=200001102F3323030620075610002&type=alipay&device=202301&goodsMsg=&sign=F8A860A5CA526F6DCF6F908435F65CBA&redirectUrl=http://xipay.xiangma365.com:8090/openpay/notify/cmfnotify&returnUrl=http%3A%2F%2Fweb.cpo2o.com%2Fcnzz%2Findex.html%3Fid%3D26&ver=2.1&profitShareType=&profitShareInfo=&goodsTag=&detail=&program_id=&pro_access_token=",
"sign": "089184616496380410679b1e3f933886"
}