InvokePayment

POST /payment/invocation/{merchant}

Invoke a payment

Path parameters

  • merchant string Required

    Merchant name to payment company, e.g. weixinpay.test

application/json

Body

  • paymentMethod string Required

    Payment method, must be wechatpay or alipay

    Values are wechatpay or alipay.

  • paymentType string Required

    Payment companies have different payment types

    Values are NATIVE, H5, JSAPI, MINIPRO, or APP.

  • payMessage string Required

    Pay message responsed from payment company

  • This url is notified when the payment succeeds

  • nonceStr string

    A random string of up to 32 characters

Responses

  • 200

    Invoke a payment order successfully.

    Hide response attributes Show response attributes object
    • code integer(int32)
    • message string | null

      Response message

    • payMessage string | null

      Payment message responsed from payment company

    • payInvokeMessage string | null

      Payment invoked message responsed from payment company

    • timeStamp string | null

      Timestamp, used to sign

    • nonceStr string | null

      Random string up to 32 characters, used to sign

  • 401

    Not Authenticated.

    Hide response attributes Show response attributes object
  • 422

    Request validation failure

    Hide response attributes Show response attributes object
  • 500

    Something wrong when making the payment.

    Hide response attributes Show response attributes object
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 examples (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 examples (401)
{
  "code": 200,
  "message": "success"
}
Response examples (422)
{
  "code": 200,
  "message": "success"
}
Response examples (500)
{
  "code": 200,
  "message": "success",
  "errors": "Something wrong when making the service."
}