Skip to content

Subscription Result Notification

  • Endpoint: POST /subscriptionResultNotifyUrl
  • Tags: Collection Service/Subscription Management

Description

When a subscription's status changes, PayerMax will notify the merchant of the current subscription status.

Parameters

FieldInTypeRequiredConstraintsDescription
Content-TypeheaderstringYes
signheaderstringYes签名信息请参考技术文档

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

FieldTypeRequiredConstraintsDescriptionEnum
codestringYesmaxLength: 32Return Code. When the transaction is successful, code: APPLY_SUCCESS and status: SUCCESS; If the transaction fails, the code will return a transaction failure error code and the status is FAILED or CLOSED.
keyVersionstringYesSignature Algorithm Version, Current value: 1
appIdstringYesMerchant AppId,The unique identifier assigned to the merchant app by PayerMax
merchantNostringNomaxLength: 32Merchant Id, the unique identifier generated when the merchant signs the contract with PayerMax
msgstringYesmaxLength: 256Return Message. When the transaction is successful, msg:Success. and status: SUCCESS; If the transaction fails, msg will return the transaction failure error msg and the status is FAILED or CLOSED.
notifyTimestringYesmaxLength: 32Notification time,Compliant with rfc3339 specification, format:yyyy-MM-dd’T’HH:mm:ss.SSSXXX
notifyTypestringYesmaxLength: 16Notification Type:SUBSCRIPTION
dataobjectYes
data.subscriptionRequestIdstringYesmaxLength: 64Merchant's unique request ID for subscription plan creation.
data.userIdstringYesmaxLength: 64User ID.
data.subscriptionPlanobjectYesSubscription plan detail.
data.subscriptionPlan.subscriptionNostringYesmaxLength: 64PayerMax subscription plan ID.
data.subscriptionPlan.subscriptionStatusstringYesmaxLength: 32Subscription plan status. INACTIVE: Not activated ACTIVE_FAILED: Activation failed ACTIVE: Activation is successful EXPIRED: Expired and not activated FINISH: Subscription Completed CANCEL: Subscription Cancel TERMINATE: Subscription termination

Example

json
{
  "code": "APPLY_SUCCESS",
  "msg": "",
  "keyVersion": "1",
  "appId": "3b242b56a8b64274bcc37dac281120e3",
  "merchantNo": "020213827212251",
  "notifyTime": "2022-01-17T09:33:54.540+00:00",
  "notifyType": "SUBSCRIPTION",
  "data": {
    "subscriptionRequestId": "testRequestId0001",
    "userId": "testUserId0001",
    "subscriptionPlan": {
      "subscriptionNo": "SUB20250417120949065211234",
      "subscriptionStatus": "ACTIVE"
    }
  }
}

Responses

200

FieldTypeRequiredConstraintsDescriptionEnum
codestringYesmaxLength: 32Response ‘SUCCESS’(Only means that the callback response is successful)
msgstringNomaxLength: 256Response’Success’(Only means that the callback response is successful)

Response Example

json
{
  "code": "SUCCESS",
  "msg": "Success"
}

Was this page helpful?

Thank you for your help in improving PayerMax Product Docs!

Released under the MIT License.