Payment Web API
Search
K

Payment Request API

API Request Parameters(HTTP-Request-Body )

Params Name
Description
Required
Notes
action
Action name
Y
“H5PAY”
version
Version number
Y
"2.0"
merchant_id
Merchant ID
Y
Provided by OTT Pay
data
Encrypted Transaction Data
Y
See "Data" table below
md5
Message Digest
Y
☑️
Request Example(JSON Data):
{
"data": "M7Unit9a4Iw93M4g2u7fXwpV+ML9JvC5C7finCYY5TbWroDIkdLNxtrpNGTh IduqwHTuG1j28MQgXuwvPOhVLzdHD1M3x5+SzfZxn2r33z1u5JqwzpzEFwqm +kj5MJBxODYCR9IJ1NH6XtzdGbdcKiPczN/QW2sdZMJ0tw5ylWAZsPwuzUXn 2LbV7WXFKqEbiJXnxDmq9OR2XPsu95RLHOG8OUq8IMX0ZKbjqZ9gFZfELe5l VgIEGE8VgIADLMOWUkZq+SKeu1YDTWN7/igp7w5jpzV+IBdVLyIkjHtbfa3k SMNxS6585O58LYBEPHniAESz3TvxhWn7AZQQ/CSyzSeBKrMLtLdvqvnwF4dC xiMV4TRN+kO9iHhix6hSYgX5usCoDWXi5vn2H4rOCR0OJA==",
"action": "H5PAY",
"merchant_id": "ON00004652",
"version": "2.0",
"md5": "66717B7C144BE13962ACFA4E70EC1957"
}

☑️
Data(JSON Data, to be encrypted):

Params Name
Description
Required
Notes
merchant_id
Merchant ID
N
shop_id
Shop ID
N
amount
Amount
Y
Unit is cent
order_id
Order ID
N
OrderID could be generated by merchant, or generated by OTTPay by default
currency_type
Transaction currency
Y
CAD/USD/CNY, MUST match to currency settings of merchant ID
biz_type
Business type
Y
“WECHATPAY”
open_id
Customer Id in WeChat pay
N
operator_id
Operator id
Y
submit_type
format
Y
“form”
call_back_url
Notify URL
Y
☑️
Data Example(JSON Data):
{
"submit_type": "form",
"shop_id": "ON00004652001",
"amount": "5",
"currency_type": "CAD",
"open_id": "owv3d1YJwmzug7z2ozlPyqIItA7E",
"operator_id": "0000000437",
"biz_type": "WECHATPAY",
"merchant_id": "ON00004652",
"order_id": "20220510125455761",
"call_back_url": "http://uatqrpay.ottpay.com/back_response"
}

API Response Parameters(HTTP-Response-Body)

Params Name
Description
Required
Notes
rsp_code
Response code
Y
refer to Appendix B
rsp_msg
Response message
Y
data
Encrypted Data
Y
See "Data" table below
md5
Message Digest
Y
☑️
Response Example(JSON Data):
{
"rsp_code": "SUCCESS",
"rsp_msg": "success",
"data": "ZDfrLAMckA3fQ09ku7vT13Fz+mfWeGaGCmVmjRZ7vbQkoOJ0G91NbU+lI6Y83QUqcFXP4G36NVAhRKa25yA/d7LbWEPoFA0fOS07V7g9SR/ZllPaHxhNlbpn gvpQ/JP+ZAW3N2HRyziih0jBeFZam/rQwlMIWShy8wQJOBzN2xaXrovYlFG6 vnR0eY3xibpCmoFYqAng7xsY7r+epX03xEllL6NljU7bUlBfbhhK6FS9/Ch6 yBI+7uCE8vxtGnY7Jb3PZxFMMmjy6mjF6xCGTWXeZu9hpEi6Fk8dRgPtkUVx q9HK66pEkvWQwhtZQQ86",
"md5": "A62FE1E70F48B2063F9B6F325C2DE4E2"
}

☑️
Transaction Data(JSON format, After decrypted)

Params Name
Description
Required
Notes
order_id
Order ID
Y
merchant_id
Merchant ID
Y
amount
amount
Y
payinfo
MWEB link
Y
time_zone_id
Time zone ID
Y
☑️
Data Example(JSON Data, after decrypted):
{
"payInfo": "https://wx.tenpay.com/cgi-bin/mmpayweb-bin/checkmweb?prepay_id=wx11005622308524e27996e33df495fc0000&package=3129796039",
"merchant_id": "ON00004652",
"order_id": "20220510125455761",
"amount": 6,
"time_zone_id": "America/Toronto"
}
Note: The amount=6 contains the 1 cent “convenience fee” addition to the original amount=5
Merchant web site adds redirect URL to payinfo, and use it to redirect the client to WeChat mobile app’s payment page

API Call Back (HTTP-POST)

Once API server finished the request process, it will send back process status to specified URL which been set up as field of 'call_back_url' within above API request parameters.

☑️
Message Payload Parameters Level (HTTP-Response-Body)

Params Name
Description
Required
Notes
rsp_code
Response code
Y
refer to Appendix B
rsp_msg
Response message
Y
merchant_id
Merchant ID
Y
data
Encrypted Transaction Data
Y
See "Data" table below
md5
Message Digest
Y
☑️
Call-Back Message Example(JSON Data):
{
"data":"hy0yiXxPH4TDXeY5ET7gqIsUcgY5ykO1vQYOahS5SsbN7/5Ha7+hvcXhgY1hz9kHuf5OxqNfv28kVeiYACrLzngk+hA2o8dVAcifT6h3AquN5micrIi3L9owj6cHT1nJRExC74sNUqF8CDY5fb4jLh9it9tq7r8xFOpcpf19VNWceo/Jt1nHca6HPMvMUEDeX1aUjnxOs7R7B2TUQbAENg\u003d\u003d",
"rsp_code":"SUCCESS",
"rsp_msg":"success",
"merchant_id":"QC00005496",
"md5":"F70CA0472D1AAA596E720C19A1DD36A0"
}

☑️
Transaction Data (JSON format, after decrypted)

Params Name
Description
Required
Notes
finish_time
Payment time
Y
yyyyMMddHHmmss (Beijing time)
order_id
Order ID
Y
amount
Transaction amount
Y
String(e.g. "100" for 1.00 dollars)
tip
tip
N
String(e.g. "100" for 1.00 dollars)
bizpay_order_id
order id from Acquirer
Y
Returned by the Payment Service Provider (e.g. WeChat Pay, Alipay)
remarks
remarks
N
sale_num
Merchant sale number
N
Provided by OTT Pay
convenience_fee
Convenience fee
N