API Explanation

Request Type

POST

Request URI

/api/v1/pay/weixin/h5-pay

Request

Parameter Type Required Description Remark
amount String Yes Transaction 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)
returnURL String Yes Return URL After the payment is completed, will navigate to this URL (Maximum length 255 English characters)
remark String No Remark Remark(Maximum length with 128 English characters)

Request Example:

{
  "amount": "100",
  "callbackURL": "https://your.callback.url",
  "returnURL": "https://your.return.url",
  "remark": ""
}

Response

Parameter Type Description Remark
payInfo String Payment Navigation Link For the front-end to complete the payment
merchantId String Merchant ID
paymentId String Payment ID
amount String Transaction Amount
timeZoneId String Time Zone ID

Response Example:

{
  "status": "SUCCESS",
  "result": {
    "payInfo": "https://wx.tenpay.com/cgi-bin/mmpayweb-bin/checkmweb?prepay_id=wx072224473808596045c0658e6e43280000&package=270306995",
    "merchantId": "ON00000097",
    "paymentId": "DEMOORDERID0000010",
    "amount": "1",
    "timeZoneId": null
  }
}

Payment Result

After the OTT Pay API server obtains the payment result from the payment channel, it will immediately send the payment result to the specified callbackURL. Of course, the merchant system can also actively query through Payment Status Query API.