Payment Request API
For Alipay on-line payment via Ailpay Wallet while Web App H5 running on mobile browser
✅ Payment Request API Link
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.
☑️ API Link Request Parameter Data Format (Example)
☑️ Request Parameters (need be URL encoded )
*️ Prefixed URL
*️ 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
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
orderId is a customized order ID provided by merchant. Once an order is placed, merchant need to send this order ID.
*️ amount
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
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 (need be encoded with Base64)
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 (need be encoded with Base64)
notifyURL is the callback URL of the merchant, which be called with the payment result from OTTPAY.
☑️ Payment Link Request Example (need to be URL encoded)
✅ Payment Return URL Link
After payment process finished, the result will be sent back by redirecting to the following payment result Web Page URL link.
☑️Return URL Link Format
☑️ Return URL Parameters (need be decoded with Base64)
*️ Prefixed URL
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
total_fee is the request amount of the order from the merchant. Number, 100 for 1.00 dollar.
*️ trade_no
trade_no is the internal order number returned from Alipay.
*️ out_trade_no
out_trade_no is the order number returned from Alipay.
*️ trade_status
trade_status shows the result of the payment. Payment succeed returns " Trade_Finished".
☑️ Return URL Link Example (URL encoded)
✅ Payment Notify URL - 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 'notifyURL' 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):
☑️ 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, "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 |
☑️ Data Example(JSON Data, after decrypted):
Last updated