Retrieve Customer Portal URL
- Endpoint:
POST /aggregate-pay/api/gateway/portalSessionCreate - Tags: Collection Service/Subscription Management
Description
Retrieve the user portal URL. Merchants can integrate this URL on the user details page. Once the user opens the URL, they can view and manage their subscriptions.
Parameters
| Field | In | Type | Required | Constraints | Description |
|---|---|---|---|---|---|
Content-Type | header | string | Yes | ||
sign | header | string | Yes | 签名信息请参考技术文档 |
Parameter Examples
Content-Type:"application/json"sign:"FPFVT3o227JrFRbqu19boZCpVVTF9KznxyRawUmxpfXilHV/0yK46haPhAjNu1hPUMy7Vw/ILXhfzffNm4Fj0apWknlTY9OJxnSoQxS9BTFtc61tn5yV1q69x/kkBl82/qwg+XTJ4fOzy7Mar3VaC1E2PlDA6RkkKBUyNE6RYgsdB+Su7an4+4HVTNAnoe74WyvBgxTLMNg28igBTdqxaO3w/UBY6ObVp7vkqkQGdL1Y+HgmMYaAVwrM3+ALWGId0sJ+YqTY4WJ+0xCRGhaSnybiIjZsQEYyID68WNUfuavDLDsEhaMm/HfQvf5p0R1Ltovp3wwJnEbQcjY458iX5A=="
Request Body
Required
Content-Type: application/json
| Field | Type | Required | Constraints | Description | Enum |
|---|---|---|---|---|---|
version | string | Yes | API version. Current value: 1.5 | ||
keyVersion | string | Yes | Signature Algorithm Version, Current value: 1 | ||
requestTime | string | Yes | Request time, compliant with rfc3339 specification, format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX The time must be within two minutes of the current time | ||
appId | string | Yes | Merchant AppId,The unique identifier assigned to the merchant app by PayerMax | ||
merchantNo | string | No | maxLength: 32 | Merchant Id, the unique identifier generated when the merchant signs the contract with PayerMax | |
data | object | Yes | |||
data.portalId | string | Yes | Customer Portal Configuration ID. You can add a customer portal configuration in the PayerMax Merchant Management, Portal under 【Acquiring Product】 - 【Subscription】 - 【Customer Portal】. | ||
data.requestId | string | Yes | Request ID, which must be unique. | ||
data.outUserId | string | Yes | The user ID of the merchant, needs to ensure the uniqueness of each user ID. | ||
data.frontCallbackUrl | string | No | Can redirect to this link from the user portal page |
Example
json
{
"version": "1.5",
"keyVersion": "1",
"requestTime": "2025-02-26T05:00:00+00:00",
"appId": "<your-app-id>",
"merchantNo": "<your-merchant-no>",
"data": {
"portalId": "<your-portal-id>",
"requestId": "<your-request-id>",
"outUserId": "user_10001",
"frontCallbackUrl": "https://your-domain.com/account"
}
}Responses
200
| Field | Type | Required | Constraints | Description | Enum |
|---|---|---|---|---|---|
code | string | Yes | Return code, ‘APPLY_SUCCESS’ means success | ||
msg | string | Yes | Return message, ‘Success.’ | ||
data | object | Yes | |||
data.redirectUrl | string | Yes | Customer Portal Address. | ||
data.requestId | string | Yes | Request ID, which must be unique. | ||
data.sessionId | string | Yes | Session ID, which expires in 60 minutes. | ||
data.outUserId | string | Yes | The user ID of the merchant, needs to ensure the uniqueness of each user ID. | ||
data.merchantNo | string | Yes | Merchant Id, the unique identifier generated when the merchant signs the contract with PayerMax. |
Response Example
json
{
"msg": "",
"code": "APPLY_SUCCESS",
"data": {
"redirectUrl": "https://billing-uat.payermax.com/#/home?sessionId=<session-id>&merchantId=<your-merchant-no>&appId=<your-app-id>",
"requestId": "<your-request-id>",
"sessionId": "<session-id>",
"outUserId": "user_10001",
"merchantNo": "<your-merchant-no>"
}
}