API Integration
1. Create PayByLink
Note:
For the detailed API parameters information, please refer to the Create PayByLink interface.
Request API, the environment and address are as follows:
API Environment | Request URL |
Test | https://pay-gate-uat.payermax.com/aggregate-pay/api/gateway/createPaybylink |
Prod | https://pay-gate.payermax.com/aggregate-pay/api/gateway/createPaybylink |
Request Header Example:
json
{
'Content-Type': 'application/json;charset=utf-8',
'Accept': 'application/json',
'sign': <Please refer to: https://docs.payermax.com/en/doc-center/developer/signature-rules.html>
};
Request Body Example:
json
{
"appId": <Merchant Platform appid>,
"merchantNo": <Merchant Number>,
"keyVersion": "1",
"requestTime": "2024-02-27T13:45:36.960+08:00",
"version": "1.1",
"data": {
"merchantLinkId": "paylinktest999",
"linkType": "ONETIME",
"expiresTime": "86400",
"country": "ID",
"currency": "IDR",
"totalAmount": "40000",
"language": "en",
"description": "冬季新款运动鞋",
"linkDescription": "链接收款衣物鞋帽",
"userInfo": {
"userId": "98",
"username": "payermax"
},
"goodsDetails": [
{
"goodsName": "运动鞋",
"goodsDescription": "冬季新款减震跑步运动鞋",
"quantity": "2",
"price": "20000",
"goodsCurrency": "IDR",
"showUrl": "http://www.baidu.com"
}
],
"notifyUrl": "http://www.baidu.com"
}
}
Request Response Example:
json
{
"msg": "Success.",
"code": "APPLY_SUCCESS",
"data": {
"linkStatus": "ACTIVE",
"linkId": "BYLqPQaQlD",
"qrCodeUrl": "https://img-cdn.shareitpay.in/qrcode/20240227054625j6r5x8.png",
"linkUrl": "http://uat.payermax.link/uat/#/BYLqPQaQlD",
"merchantLinkId": "paylinktest999",
"expiresAt": "2024-02-28T05:46:25Z"
}
}
2. Query Paybylink
- Query Paybylink interface will return the specific time when the link becomes invalid.
- This interface is only a link status query and does not represent the order status.
3. Expired PayByLink
- Before the user completes the payment, you can call the Expired PayByLink interface in advance to invalidate the link. After the expiration, the user will not be able to open the payment.
- If the user has already completed the payment, this function will not be available.
4. PayByLink Updates & Callbacks
You need to add the callback address of the link payment in the background.
We will call back the link update status to the server through the address you configured. For callback data, please refer to the PayByLink Updates & Callbacks interface.