Payment Request API
For Alipay on-line payment via Ailpay Wallet while Web App H5 running on mobile browser
Last updated
For Alipay on-line payment via Ailpay Wallet while Web App H5 running on mobile browser
Last updated
The link for payment button on merchant's web page to allow customer to activated Alipay Wallet payment process.
Once Alipay payment process finished, web browser will be redirected to the following returnURL defined by the merchant according to its own business needs with receiving Alipay payment result.
merCode
merCode is the merchant payment key. Once a merchant accept OTT Pay WeChat Official Account service , OTTPay operation team will send this code through welcome email.
merchantId is a merchant ID created by OTTPAY. Once a merchant starts OTTPAY payment service, OTTPAY operation team will send this ID through welcome email.
orderId is a customized order ID provided by merchant. Once an order is placed, merchant need to send this order ID.
Amount of the order. Merchant need to send the amount to OTT server.
Note: The number is based on cents, which means 100 for 1.00 dollar.
operId is an operator number with 10-digit created by OTTPAY. Once a merchant starts OTTPAY payment service, OTTPAY operation team will send this ID through welcome email.
returnURL is the link to the order processing page to be displayed by the merchant after the payment request is returned, which is defined by the merchant according to its own business needs. That is, after payment is completed, Alipay redirects back to this page of the merchant's website
notifyURL is the callback URL of the merchant, which be called with the payment result from OTTPAY.
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 returned from Alipay.
out_trade_no is the order number returned from Alipay.
trade_status shows the result of the payment. Payment succeed returns " Trade_Finished".
Once API server finished the request process, it will send back process status to specified URL which been set up as field of 'notifyURL' within above API request parameters.
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, "100" for 1.00 dollar.
tip
tip amount
N
String, "100" for 1.00 dollar.
bizpay_order_id
order id from Acquirer
Y
Returned by the Payment Service Provider (e.g. WeChat Pay, Alipay)
merchant_id
Merchant ID
Y
Provided by OTT Pay
operId
Call-Back Message Example(JSON Data):
Data Example(JSON Data, after decrypted):