Payment Request with Alipay
For Alipay on PC-Browser
Last updated
For Alipay on PC-Browser
Last updated
The format and introduction of payment request link as followed:
merCode
merCode is the payment code for merchants, it is generated with 16 digits random rode. Once a merchant starts OTTPAY payment 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 is the order amount. Once the customer places the order, the merchant need to send the amount.
Note: All the monetary measurement unit in API are CENT, which means 1 dollar = 100
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. It is required to have it Base64 encoded in the request.
notifyURL is the callback URL of the merchant, that is, the link with the payment result from OTTPAY. It is required to have it Base64 encoded in the request.
submit_type is the flag for response format. If submit_type=”scan”, OTT Pay will return a dynamic link, else if submit_type=”form”, OTT Pay will return HTML form.
remarks for the transaction input by client
Example:
The next action: redirect to Payment Request Link and start to pay
The next action: embed and show the form on your page and start to pay
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
remarks
Remarks for order
N
operId
If send with submit_type=scan, then response is the Payment Request Link.
If send with submit_type=form, then response is Form HTML.
Call-Back Message Example(JSON Data):
Data Example(JSON Data, after decrypted):