订阅更新确认
- Endpoint:
POST /aggregate-pay/api/gateway/subscriptionUpdate - Tags: 收单/订阅计划管理
Description
订阅计划被激活后,在后续阶段商户可自助对该已激活的订阅计划进行更新,包括从低阶产品升级到高阶产品、从高阶产品降级到低阶产品、月付/年付周期切换,以及团队席位增减等场景。 第一步:先进行更新预览,参见subscriptionUpdatePreview接口 第二步:再对预览结果进行更新确认(本接口)
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
Content-Type: application/json
| Field | Type | Required | Constraints | Description | Enum |
|---|---|---|---|---|---|
version | string | Yes | maxLength: 8 | 接口版本 当前值为:1.5 | |
keyVersion | string | Yes | maxLength: 8 | 密钥版本 当前值为:1 | |
requestTime | string | Yes | maxLength: 32 | 请求时间,符合rfc3339规范,格式:yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时间需要在当前时间两分钟内 | |
appId | string | Yes | maxLength: 64 | 商户应用Id,PayerMax分配给商户应用的唯一标识 | |
merchantNo | string | No | maxLength: 32 | 商户号,商户与PayerMax业务签约时生成的唯一标识 | |
data | object | Yes | |||
data.subscriptionNo | string | Yes | maxLength: 64 | PMX生成的订阅单号。subscriptionRequestId和subscriptionNo至少填其一 | |
data.subscriptionRequestId | string | Yes | maxLength: 64 | 商户创建订阅计划的单号。subscriptionRequestId和subscriptionNo至少填其一 | |
data.priceUpdateInfo | object | Yes | |||
data.priceUpdateInfo.previewId | string | Yes | maxLength: 64 | PMX 生成的唯一的预览单号。subscriptionUpdatePreview接口响应的预览previewId |
Example
json
{
"version": "1.5",
"keyVersion": "1",
"requestTime": "2025-02-26T05:00:00+00:00",
"appId": "6666c8b036a245799744912345a123456",
"merchantNo": "P00213827211234",
"data": {
"subscriptionNo": "SUB20250417120949065211234",
"subscriptionRequestId": "requestId_test001",
"priceUpdateInfo": {
"previewId": "UPD2038911684354984654"
}
}
}Responses
200
| Field | Type | Required | Constraints | Description | Enum |
|---|---|---|---|---|---|
code | string | Yes | 返回码,’APPLY_SUCCESS’代表成功 | ||
msg | string | Yes | 返回描述,’Success.’ | ||
data | object | Yes | |||
data.merchantNo | string | Yes | maxLength: 64 | 商户号 | |
data.subscriptionRequestId | string | Yes | maxLength: 64 | 商户创建订阅计划的单号 | |
data.subscriptionPlan | object | Yes | |||
data.subscriptionPlan.subscriptionNo | string | Yes | maxLength: 64 | 订阅计划号 | |
data.subscriptionPlan.subscriptionStatus | string | Yes | maxLength: 32 | 订阅计划当前状态 | |
data.priceUpdateInfo | object | Yes | |||
data.priceUpdateInfo.previewId | string | Yes | maxLength: 64 | PMX 生成的唯一的预览单号 | |
data.priceUpdateInfo.status | string | Yes | maxLength: 32 | 本次更新请求的处理结果 | |
data.priceUpdateInfo.redirectUrl | string | Yes | maxLength: 1024 | 跳转地址。 需要用户验证时,会返回该地址,需要跳转外部完成支付 |
Response Example
json
"{\n \"code\": \"APPLY_SUCCESS\",\n \"msg\": \"Success.\",\n \"data\": {\n \"subscriptionRequestId\": \"requet_id_00002\",\n \"merchantNo\": \"P0014894534684\",\n \"subscriptionPlan\": {\n \"subscriptionNo\": \"SUB20250417120949065211234\",\n \"subscriptionStatus\": \"ACTIVE\"\n },\n \"priceUpdateInfo\": {\n \"previewId\": \"UPD2038911684354984654\",\n \"redirectUrl\": \"https://xxx.com\",\n \"status\": \"PENDING\",\n }\n }\n}"