Path parameters
-
merchant string Required
Merchant name to payment company, e.g. weixinpay.test
Body
-
paymentMethod string Required
Payment method, must be wechatpay or alipay
Values are
wechatpay
oralipay
. -
paymentType string Required
Payment companies have different payment types
Values are
NATIVE
,H5
,JSAPI
,MINIPRO
, orAPP
. -
payMessage string Required
Pay message responsed from payment company
-
timeStamp string
This url is notified when the payment succeeds
-
nonceStr string
A random string of up to 32 characters
POST /payment/invocation/{merchant}
curl \
-X POST https://nomad.samarkand-global.cn/broker/v1/payment/invocation/wechat.sh_smk \
-H "app-api-key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"paymentMethod":"wechatpay","paymentType":"H5","payMessage":"https://wx.tenpay.com/cgi-bin/mmpayweb-bin/checkmweb?prepay_id=wx2711083","timeStamp":1414561699,"nonceStr":"5K8264ILTKCH16CQ2502SI8ZNMTM67VS"}'
Request example
{
"paymentMethod": "wechatpay",
"paymentType": "H5",
"payMessage": "https://wx.tenpay.com/cgi-bin/mmpayweb-bin/checkmweb?prepay_id=wx2711083",
"timeStamp": 1414561699,
"nonceStr": "5K8264ILTKCH16CQ2502SI8ZNMTM67VS"
}
Response example (200)
{
"code": 200,
"message": "success",
"payMessage": "https://wx.tenpay.com/cgi-bin/mmpayweb-bin/checkmweb?prepay_id=wx031",
"payInvokeMessage": "weixin://wap/pay?prepayid%3Dwx03143347..",
"timeStamp": 1414561699,
"nonceStr": "5K8264ILTKCH16CQ2502SI8ZNMTM67VS"
}
Response example (401)
{
"code": 200,
"message": "success"
}
Response example (422)
{
"code": 200,
"message": "success"
}
Response example (500)
{
"code": 200,
"message": "success",
"errors": "Something wrong when making the service."
}