此接口必须在创建订单后才能调用,用户必须是绑定微信公众号或者微信小程序,如果没有绑定会提示201004错误码,需要调用《绑定微信小程序或者微信公众号》完成绑定。
请求地址:
环境 | 请求地址HTTP(S) |
正式环境 | http://pay.aimlt.com/standard/Oredes/createMpWeixinPay |
公共请求参数:
详情请求公共参数说明
请求参数
参数 | 类型 | 是否必填 | 最大长度 | 描述 | 示例值 |
appid | String | 是 | 32 | 金康云客户端ID | |
out_trade_no | String | 是 | 64 | 商户号或者交易号 | 1578118154123220194112150232 |
wxid | String | 是 | 32 | 微信小程序ID | |
响应示例
{
"errcode": "200",
"errmsg": "ok",
"data": {
"appId": "wx505ef587989b8b37",
"timeStamp": 1714454450,
"nonceStr": "0038b36980698c34477a8ce4f2713817",
"package": "prepay_id=wx30132050199544067bc47267f695210001",
"signType": "MD5",
"paySign": "D9633747A740E7803918B653ACD71ACD"
},
"wxid": "gh_4a2a565f9552"
}
异常示例
{
"errcode":"203019",
"errmsg":"No order information"
}
没有绑定微信错误
{
"errcode":"201004",
"errmsg":"User not bound to WeChat"
}