API Explanation

Request Type

POST

Request URI

/api/v1/pay/alipay/web-pay

Request

ParameterTypeRequiredDescriptionRemark
amountStringYesTransaction Amountcent is the unit, “100” means a dollar
callbackURLStringYesCallback URLAfter the payment is completed, the system sends a notification to this URL (Maximum length 255 English characters)
returnURLStringYesReturn URLAfter the payment is completed, the front end will navigate to this URL (Maximum length 255 English characters)
remarkStringNoRemark(Maximum length 128 English characters)

Request Example:

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

Response

ParameterTypeDescriptionRemark
payInfoStringPayment LinkPayment Link to Navigate
merchantIdStringMerchant ID
paymentIdStringPayment ID
amountStringTransaction Amount
bizPayOrderIdStringThe order number of the payment channel

Response Example:

{
  "status": "SUCCESS",
  "result": {
    "payInfo": "https://intlmapi.alipay.com/gateway.do?_input_charset=UTF-8&currency=CAD&notify_url=https%3A%2F%2Fuat-scanpay.ottpay.com%2Fonline%2Fnotify%2F&order_gmt_create=2023-03-02+00%3A37%3A19&order_valid_time=180&out_trade_no=AL4090000649860437&partner=2088721517311327&product_code=NEW_OVERSEAS_SELLER&return_url=https%3A%2F%2Fwww.example.ca&secondary_merchant_id=ON00000185&secondary_merchant_industry=5944&secondary_merchant_name=123Techtesting&service=create_forex_trade&subject=%28OTTITTTTest%29GCwebappONLY&total_fee=10.00&sign_type=RSA&sign=ZBTOPk7qm3AdR1CCCMj7Dqlw%2BpICZKu2i%2BwJBaYE6NXW%2BscOSxTTvAUG9BYiKXz3o95kYN4WJE9NzuZLiu4EhCH5LjKXTSXI03t%2BjY7kVgUq%2BhaeQrtF6w4KuS5SaMqH2ZW7%2FBXM3WyXTd6nB4NYLuEV6q0LIEZw0TjXuHyvVjzSZJXGiumQL612QHE2fZaA0His051KVW8otQZRJ2LeDxyyjgwivGcHfazy8tBSMXrTUIAuHhL5tQ%2B7u2XElUgwiCSgoh1NFkX%2BTu0RHpauwexRQExV4Hk0rCIXhB5ERktZRZwe%2Fq%2FR%2BdeP498NIkhXBOk5hYFRgioS2ld0NW%2FyXA%3D%3D",
    "merchantId": "ON00000185",
    "paymentId": "1677688673404319",
    "amount": "1000",
    "bizPayOrderId": "AL4090000649860437"
  }
}

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.