GET 微信小程序获取openid
GET /jscode2session
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
orderId | query | string | 否 | 支付FM订单号,H5拉起小程序时候会传入 |
code | query | string | 否 | wx.login获取的凭证,https://developers.weixin.qq.com/miniprogram/dev/api/open-api/login/wx.login.html |
返回示例
200 Response
{
"success": true,
"msg": "success",
"code": 200,
"timestamp": 1761012918283,
"data": {
"session_key": "kB1uyZyG5k7k8d3G1BfWcQ==",
"openid": "oFyk-16rQLFkjFqU90pFZBB4Wu9I"
}
}
返回结果
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | none | Inline |
返回数据结构
状态码 200
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
» success | boolean | true | none | none | |
» msg | string | true | none | none | |
» code | integer | true | none | none | |
» timestamp | integer | true | none | none | |
» data | object | true | none | none | |
»» session_key | string | true | none | none | |
»» openid | string | true | none | openid |
GET 微信小程序调起支付数据
GET /wxminjsapi
获得 prepayid等数据,直接小程序调起支付
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
openid | query | string | 否 | 微信用户openid |
orderId | query | string | 否 | 支付FM平台订单号 |
返回示例
200 Response
{
"success": true,
"msg": "success",
"code": 200,
"timestamp": 1761018451390,
"data": {
"paysign": "qgCoVmhOzwtMZRI0qIpE/4GvLvHwFrQ9yz5o2LAiPqDTEM5Uft8/eVtG7Pw5NrZitOHhgcIp+Om8DPs5b+6Jf1zdl7GRIkhtEAAOz0nEwuFKG5/cV2jGxNAZVDLBVcJIU03pGd65WR4vwEGEREHyP6PDK/ILF7K2xptO4kQor+naic90KV9JBOTY+NCptf7Mp87QglrKW1gxiOflhta1ECOMP9EsVN27ShLbPHCxw9UZKUyts3cxutptgEwA3j2tEP2XnUqFbZsKvrDq6guwwVDw07l7YXlHUyU7OrxA9TgFVKGSMo4JAeR+5qJ/r9qASFhO84nt/T/yXL/hw9UggA==",
"timestamp": "1761012331",
"appid": "wx71f1353f119d7663",
"prepayId": "wx21114229521410bcf46603b3ed27460000",
"nonceStr": "574623147236524032",
"package": "prepay_id=wx21114229521410bcf46603b3ed27460000"
}
}
返回结果
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | none | Inline |
返回数据结构
状态码 200
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
» success | boolean | true | none | none | |
» msg | string | true | none | none | |
» code | integer | true | none | none | |
» timestamp | integer | true | none | none | |
» data | object | true | none | 小程序调起支付数据 | |
»» paysign | string | true | none | none | |
»» timestamp | string | true | none | none | |
»» appid | string | true | none | none | |
»» prepayId | string | true | none | none | |
»» nonceStr | string | true | none | none | |
»» package | string | true | none | none |