跳转至

申请扣款接口

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

请求参数

变量名 类型 必填 示例值 描述
appId string Y 应用标识
body string Y 商品描述
contractId string Y 委托代扣协议ID
detail string Y 商品详情
feeType string Y CNY 货币类型
mchId string Y 93747514 商户号
notifyUrl string Y http://deductiontest.shengpay.com/notify 扣款成功通知地址
outTradeNo string Y 商户订单号
outerId string Y 商户侧用户标识
totalFee number Y 订单金额
nonceStr String(32) Y 随机字符串
signType String(10) Y RSA 加签方式
Sign String(500) Y 签名
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
{
  "appId": "wxd678efh567hg6787",
  "body": "测试商品",
  "contractId": "WD2020102900100701",
  "detail": "",
  "feeType": "CNY",
  "mchId": 93747514,
  "notifyUrl": "http://deductiontest.shengpay.com/notify",
  "outTradeNo": "100290807001",
  "outerId": "9A2CE6A3FA1AFB3302F643D3B817AD5B",
  "totalFee": 100
}

响应参数

变量名 类型 必填 示例值 描述
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时使用)
transactionId 扣款交易流水号 Y string
nonceStr String Y nGBXiNhZjBaFrMGIJAKJQQpfNiSGVjzy 随机字符串
signType String Y RSA 签名方式
sign String Y 签名
1
2
3
4
{
  "resultCode": "SUCCESS",
  "transactionId": "DO497469603661217792"
}
Back to top