API Explanation

Request Type

POST

Request URI

/api/v1/pay/weixin/public-pay

Request

ParameterTypeRequiredDescriptionRemark
amountStringYesTransaction Amountcent 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 Link
merchantIdStringMerchant ID
amountStringTransaction Amount
paymentIdStringPayment Id

Response Example:

{
  "status": "SUCCESS",
  "result": {
    "payInfo": "https://hkqrpay.ottpay.com/hk-public-wechatpay?merCode=15ee1f20e263dbbd6311df1da004ee2e&amount=10&paymentId=16800235431079665&remark=MTIzNDU2&returnURL=aHR0cHM6Ly93d3d3Lm90dC5jYQ==&callbackURL=aHR0cHM6Ly93d3d3Lm90dC5jYQ==",
    "merchantId": "HK00008875",
    "paymentId": "16800235431079665",
    "amount": "10"
  }
}

payInfo contains Payment Navigation Link, which is used to navigate to the web page to complete the payment