API Explanation

Request Type

POST

Request URI

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

Request

ParameterTypeRequiredDescriptionRemark
amountStringYesTransactioncent is the unit, “100” means a dollar
callbackURLStringYesCallback URLSend notifications to this URL when an order is complete (Maximum length 255 English characters)
returnURLStringYesReturn URLAfter the payment is completed, will navigate to this URL (Maximum length 255 English characters)
remarkStringNoRemarkRemark(Maximum length with 128 English characters)

Request Example:

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

Response

ParameterTypeDescriptionRemark
payInfoStringPayment Navigation LinkFor the front-end to complete the payment
merchantIdStringMerchant ID
paymentIdStringPayment ID
amountStringTransaction Amount
timeZoneIdStringTime 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.