Alipay
POST
https://pay.online.ai/paymentNote: OnlinePay background will obtain the referer of Http Header to verify the website source. The website source must be configured in the OnlinePay merchant background to pass the detection. If you do not access the interface through a browser, you need to actively add a referer
请求参数
Fixed value: ALIPAY
Merchant Number, Unique identifier assigned to the merchant by the onlinepay payment platform when registering with onlinepay
Merchant Order Number, Each order must be unique, and each merchant order number can only be submitted once within 1 second
Please refer to Currency Code
Total amount of the order, keep two decimals
Jump address after payment is completed,
When the payment is completed, the payment result will be sent to notifyUrl
signature, MD5(merNo+merOrderNo+currencyCode+sourceAmount+PrivateKey)
Cardholder IP address
V3.0.0
Payment user ID
Payment user Email
Mobile system, Mobile system IOS or ANDROID
Terminal, WEB: indicates that a PC browser is used.WAP: indicates that a mobile browser is used.APP: indicates that a mobile app is used.MINI_APP: indicates that a mini program is used
{
"merNo": 111111,
"merOrderNo": "222222",
"currencyCode": "CNY",
"sourceAmount": "100.05",
"returnUrl": "https://example.com",
"notifyUrl": "https://example.com/notify",
"sign": "9D6FDF4880B00B002B1F2AB61AE9A721",
"ipAddress": "116.235.134.86",
"version": "V3.0.0",
"userId": "111",
"email": "example@gmail.com",
"osType": "ANDROID",
"terminal": "WAP"
}
示例代码
Responses
If the value is 0000, it will return success, other please refer to Error Code
Interface returns description
Request response data
The flow number generated after each order payment (unique marker)
Payment status code(Where: 1 means payment failure, 0 means payment success, 2 means pending)
If the paycode is 2, redirect to this address
Corresponds to the [OrderNo] parameter of the order submission parameter
{
"code": "00000",
"message": "SUCCESS",
"data": {
"payCode": 0,
"tradeNo": "SN2201111806024151",
"merOrderNo": "1641972507000",
"payUrl": "http://abc.com/notify"
}
}