API Explanation

Request Type


Request URI



Parameter Type Required Description Remark
appId String Yes WeChat appId
openId String Yes WeChat openId The user openId obtained in the WeChat mini app
amount String Yes Transaction Amount cent is the unit, “100” means a dollar
callbackURL String Yes Callback URL Send notifications to this URL when an order is complete (Maximum length 255 English characters)
remark String No Remark Remark(Maximum length with 128 English characters)

Request Example:

  "appId": "wx2f194e1f2a4e1645",
  "openId": "owv3d1fnMx1IpB6dWL7pK3TmJhBe",
  "amount": "100",
  "callbackURL": "https://your.callback.url",
  "remark": ""


Parameter Type Description Remark
payInfo String Payment Parameters
merchantId String Merchant ID
paymentId String Payment ID
amount String Transaction Amount

Response Example:

  "status": "SUCCESS",
  "result": {
    "payInfo": "{\"appId\":\"wx53949a5b7cda9226\",\"timeStamp\":\"2023030612\",\"nonceStr\":\"Qga4FuDEVFlEr13C\",\"packageStr\":\"prepay_id\\u003dwx07010712646422b84dfd8c4e7844f50000\",\"signType\":\"MD5\",\"paySign\":\"18F34642E2DB3F7A5978C9F77AA3EE60\"}",
    "merchantId": "AB00000004",
    "paymentId": "1678122425666817",
    "amount": null

Among them, payInfo contains the following data in JSON format, which is required by the front-end to complete the payment

  "appId": "wx53949a5b7cda9226",
  "timeStamp": "2023030612",
  "nonceStr": "Qga4FuDEVFlEr13C",
  "packageStr": "prepay_id=wx07010712646422b84dfd8c4e7844f50000",
  "signType": "MD5",
  "paySign": "18F34642E2DB3F7A5978C9F77AA3EE60"