跳转至

纯签约接口(H5)

请求方式 body 编码 接口地址
POST application/json UTF-8 集测:https://mchapitest.shengpay.com/papay/h5/entrust
生产:https://mchapi.shengpay.com/papay/h5/entrust

请求参数

变量名 类型 必填 示例值 描述
appId String Y 应用标识
clientIp String N 101.95.128.50 服务IP
contractDisplayAccount String Y 张三 签约用户的显示名称
mchId String Y 93747514 商户号
notifyUrl String Y http://deductiontest.shengpay.com/notify 签约成功通知地址URL
outContractCode String Y 100000001 商户侧签约协议号
outerId String N 商户侧用户标识
planId int(64) Y 100000 协议模板ID
returnUrl String N 签约成功跳转URL
nonceStr String Y nGBXiNhZjBaFrMGIJAKJQQpfNiSGVjzy 随机字符串
signType String Y RSA 签名方式
sign String Y 签名 (见签名介绍)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "appId": "wxd678efh567hg6787",
  "clientIp": "101.95.128.50",
  "contractDisplayAccount": "张三",
  "mchId": 93747514,
  "notifyUrl": "http://deductiontest.shengpay.com/notify",
  "outContractCode": 100000001,
  "outerId": "9A2CE6A3FA1AFB3302F643D3B817AD5B",
  "planId": 100000
}

响应参数

变量名 类型 必填 示例值 描述
returnCode String Y SUCCESS 返回码(SUCCESS/FAIL)
returnMsg String N 返回消息(当returnCode为FAIL时使用)
resultCode String Y SUCCESS 业务结果(SUCCESS/FAIL)
errorCode String N 错误代码(当resultCode为FAIL时使用)
errorCodeDes String N 错误描述(当resultCode为FAIL时使用)
redirectUrl String Y 跳转URL
sessionId String Y 会话标识
nonceStr String Y nGBXiNhZjBaFrMGIJAKJQQpfNiSGVjzy 随机字符串
signType String Y RSA 签名方式
sign String Y 签名
1
2
3
4
5
{
  "redirectUrl": "https://ann.shengpay.com/read-auto-renew/v1/index.html?sessionId=d053a4d8d04bb695e050840aa251c254",
  "resultCode": "SUCCESS",
  "sessionId": "d053a4d8d04bb695e050840aa251c254"
}
Back to top