Payment Result Notification
- Endpoint:
POST /subscriptionPaymentResultNotifyUrl - Tags: Collection Service/Subscription Management
Description
Once activated, PayerMax will automatically process recurring payments according to the billing cycle specified when the merchant created the subscription plan. Payment Notifications: (1) Merchants will receive payment result notifications after each successful payment. (2) For failed payments: PayerMax will retry it, and will notify the merchant of the payment result after the final retry attempt.
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 |
|---|---|---|---|---|---|
code | string | Yes | maxLength: 32 | Return 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. | |
keyVersion | string | Yes | Signature Algorithm Version, Current value: 1 | ||
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 | |
msg | string | Yes | maxLength: 256 | Return 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. | |
notifyTime | string | Yes | maxLength: 32 | Notification time,Compliant with rfc3339 specification, format:yyyy-MM-dd’T’HH:mm:ss.SSSXXX | |
notifyType | string | Yes | maxLength: 16 | Notification Type:SUBSCRIPTION_PAYMENT | |
data | object | Yes | |||
data.subscriptionRequestId | string | Yes | maxLength: 64 | Merchant's unique request ID for subscription plan creation. | |
data.userId | string | Yes | maxLength: 64 | User ID. | |
data.subscriptionPlan | object | Yes | Subscription plan details | ||
data.subscriptionPlan.subscriptionNo | string | Yes | maxLength: 64 | PayerMax subscription plan ID. | |
data.subscriptionPaymentDetail | object | Yes | Payment details for the subscription period. | ||
data.subscriptionPaymentDetail.subscriptionIndex | number | Yes | Subscription period sequence number. | ||
data.subscriptionPaymentDetail.paymentStatus | string | Yes | maxLength: 32 | Current payment status: PENDING: Processing SUCCESS: Successful FAILED: Failed | |
data.subscriptionPaymentDetail.periodStartTime | string | Yes | Subscription period start time. Example: 2025-01-13T15:59:59+0000 | ||
data.subscriptionPaymentDetail.periodEndTime | string | Yes | Subscription period end time. Example: 2025-02-13T15:59:59+0000 | ||
data.subscriptionPaymentDetail.payAmount | object | Yes | Payment amount details. | ||
data.subscriptionPaymentDetail.payAmount.amount | number | No | Payment amount. | ||
data.subscriptionPaymentDetail.payAmount.currency | string | No | maxLength: 3 | Currency code. | |
data.subscriptionPaymentDetail.paymentMethodType | string | Yes | maxLength: 64 | Payment method type. | |
data.subscriptionPaymentDetail.cardOrg | string | Yes | maxLength: 64 | Card organization/brand. | |
data.subscriptionPaymentDetail.lastPaymentInfo | object | Yes | Latest payment attempt details | ||
data.subscriptionPaymentDetail.lastPaymentInfo.lastPaymentStatus | string | Yes | maxLength: 32 | Latest payment result: PENDING: Processing SUCCESS: Successful FAILED: Failed | |
data.subscriptionPaymentDetail.lastPaymentInfo.payTime | string | Yes | Payment time. Example: 2025-01-12T15:59:59+0000 | ||
data.subscriptionPaymentDetail.lastPaymentInfo.tradeToken | string | No | maxLength: 64 | Payment transaction ID (Can be used for refund). Note: This value must be present when success. | |
data.subscriptionPaymentDetail.lastPaymentInfo.errorCode | string | No | maxLength: 64 | Payment failure error code. | |
data.subscriptionPaymentDetail.lastPaymentInfo.errorMsg | string | No | maxLength: 512 | Payment failure error message. | |
data.subscriptionPaymentDetail.cardInfo | object | No | Card Info | ||
data.subscriptionPaymentDetail.cardInfo.cardOrg | string | No | maxLength: 32 | Card Scheme, will return when the user chooses card scheme to pay | |
data.subscriptionPaymentDetail.cardInfo.country | string | No | maxLength: 2 | Card issuing country | |
data.subscriptionPaymentDetail.cardInfo.cardType | string | No | maxLength: 32 | Card funding type, such as DEBIT、CREDIT and so on. | |
data.subscriptionPaymentDetail.cardInfo.totalCardOrg | array[string] | No | Brand of the card.Dual-standard card returns two brands. | ||
data.subscriptionPaymentDetail.cardInfo.type | string | No | maxLength: 32 | Type of the card. PAN is a full pan; NETWORK_TOKEN is not a full pan, such as APPLEPAY. | |
data.subscriptionPaymentDetail.cardInfo.source | string | No | maxLength: 32 | Source of the card. CARD、APPLEPAY、GOOGLEPAY_PAN、GOOGLEPAY_CRYPTOGRAM、NETWORK_TOKEN | |
data.subscriptionPaymentDetail.cardInfo.cardBinNo | string | No | maxLength: 16 | Card BIN number. | |
data.subscriptionPaymentDetail.cardInfo.cardNumber | string | No | maxLength: 32 | Masked card number. | |
data.subscriptionPaymentDetail.cardInfo.cardHolderName | string | No | maxLength: 128 | Masked cardholder name. | |
data.subscriptionPaymentDetail.cardInfo.cardLast4 | string | No | maxLength: 4 | The last four digits of the card. | |
data.subscriptionPaymentDetail.cardInfo.cardExpirationYear | string | No | maxLength: 2 | Two-digit number representing the card’s expiration year. | |
data.subscriptionPaymentDetail.cardInfo.cardExpirationMonth | string | No | maxLength: 2 | Two-digit number representing the card’s expiration month. |
Example
json
{
"code": "APPLY_SUCCESS",
"msg": "",
"keyVersion": "1",
"appId": "3b242b56a8b64274bcc37dac281120e3",
"merchantNo": "020213827212251",
"notifyTime": "2022-01-17T09:33:54.540+00:00",
"notifyType": "SUBSCRIPTION_PAYMENT",
"data": {
"subscriptionRequestId": "testRequestId0001",
"userId": "testUserId0001",
"subscriptionPlan": {
"subscriptionNo": "SUB20250417120949065211234"
},
"subscriptionPaymentDetail": {
"subscriptionIndex": 0,
"paymentStatus": "SUCCESS",
"periodStartTime": "2025-01-13T15:59:59+0000",
"periodEndTime": "2025-02-13T15:59:59+0000",
"payAmount": {
"amount": 128.39,
"currency": "USD"
},
"paymentMethodType": "CARD",
"cardOrg": "VISA",
"lastPaymentInfo": {
"tradeToken": "T20250417174800970112345",
"lastPaymentStatus": "SUCCESS",
"payTime": "2025-01-12T15:59:59+0000"
}
}
}
}Responses
200
| Field | Type | Required | Constraints | Description | Enum |
|---|---|---|---|---|---|
code | string | Yes | maxLength: 32 | Response ‘SUCCESS’(Only means that the callback response is successful) | |
msg | string | No | maxLength: 256 | Response’Success’(Only means that the callback response is successful) |
Response Example
json
{
"code": "SUCCESS",
"msg": "Success"
}