Payment Request API
Last updated
Last updated
Request Example(JSON Data):
Note:
The payinfo
in the response contains the payment link to OTT Pay’s Checkout Platform. Example:
Additionally, Merchant can add the selected parameter according to their own settings. Example:
merchant use payinfo
to redirect the browser to OTT Pay’s Checkout Platform where the client can finish the payment.
selected can be chosen from the following parameters: NONE, WECHATPAY, ALIPAY, UNIONPAY, GP
This parameter is used to select the payment method that can be activated directly.
For example, if selected=WECHATPAY, the payment method will be activated directly from WeChat wallet. selected=NONE, there is no priority payment method, the user selects the payment method from the payment list.
After payment process finished, the result will be sent back by redirecting to the following payment result Web Page URL link.
Prefixed URL is a customized page for order processing, /xxx is an additional page for the merchant according to their own business. e.g.
total_fee is the request amount of the order from the merchant. Number, 100 for 1.00 dollar.
trade_no is the internal order number.
out_trade_no is the order number.
trade_status shows the result of the payment. Payment succeed returns " Trade_Finished".
After the user completes the payment,, OTTPAY 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
"PREPAY_INIT"
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
Y
shop_id
Shop ID
Y
operator_id
Operator ID
Y
prepay_order_id
Prepay Order ID
Y
sale_num
Sale number
Y
currency_type
Currency
Y
“CAD”/”USD”/”CNY” match with settings of merchant ID
biz_type
Business type
Y
“PREPAY”
redirect_url
Redirect URL
Y
call_back_url
Notify URL
Y
duration
Payment duration
Y
Duration of payment, unit in seconds. Please note, expire time will be calculated by the duration and the time the prepay order is created. The expire time will return in response
Client email
N
remarks
Transaction remark
N
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
preypay_order_id
Order ID
Y
payinfo
Payment link
Y
the redirect link to OTT Pay platform
expire_time
Expire time
Y
Expire time of payment
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
tip
tip
N
bizpay_order_id
order id from Acquirer
Y
remarks
remarks
N
sale_num
merchant sale number
N
convenience_fee
Convenience fee
N