Payment Request API
Last updated
Last updated
Request Example(JSON Data):
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
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.
Data Example(JSON Data):
Response Example(JSON Data):
Data Example(JSON Data, after decrypted):
Call-Back Message Example(JSON Data):
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
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
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
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
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
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