跳至主要内容

Agreement Webhooks

Agreement webhooks notify merchants about agreement lifecycle changes. All agreement webhooks use notifyType: AGREEMENT_STATUS.


Sign Result Notification

Notifies merchant when user completes or fails the sign process.

data Fields

ParameterTypeDescription
agreementNostringPlatform agreement number
externalAgreementNostringMerchant agreement number
agreementTypestringSign type: CYCLE / NON_CYCLE / SINGLE
eventTypestringEvent type: SIGNED / FAILED
statusstringSign status: SIGNED / FAILED
userIdstringPlatform user ID
merchantUserIdstringMerchant-side user ID
sceneCodestringScene code
signTimestringSign time (on success)
failureCodestringFailure error code (on failure, 9-digit string)
failureReasonstringFailure reason description (on failure)

Example (Success)

{
"notifyId": "NOTIFY202601070001",
"notifyType": "AGREEMENT_STATUS",
"notifyTime": "2026-01-07T10:30:05+08:00",
"merchantId": "M123456789",
"data": {
"agreementNo": "AGR202601070001",
"externalAgreementNo": "MERCHANT_AGR_001",
"agreementType": "CYCLE",
"eventType": "SIGNED",
"status": "SIGNED",
"userId": "U_123456789",
"merchantUserId": "merchant_user_123",
"sceneCode": "SUBSCRIPTION",
"signTime": "2026-01-07 10:30:00"
},
}

Example (Failure)

{
"notifyId": "NOTIFY202601070002",
"notifyType": "AGREEMENT_STATUS",
"notifyTime": "2026-01-07T10:35:05+08:00",
"merchantId": "M123456789",
"data": {
"agreementNo": "AGR202601070002",
"externalAgreementNo": "MERCHANT_AGR_002",
"agreementType": "CYCLE",
"eventType": "FAILED",
"status": "FAILED",
"userId": "U_123456789",
"merchantUserId": "merchant_user_123",
"sceneCode": "SUBSCRIPTION",
"failureCode": "139001001",
"failureReason": "User authentication timeout (downstream code=300100002, msg=User auth timeout)"
},
}

Unsign Notification

Notifies merchant when an agreement is terminated.

data Fields

ParameterTypeDescription
agreementNostringPlatform agreement number
externalAgreementNostringMerchant agreement number
eventTypestringEvent type: UNSIGNED
statusstringAgreement status: UNSIGNED
unsignTypestringUnsign type: USER / MERCHANT / EXPIRED / SYSTEM
unsignTimestringUnsign time

Example

{
"notifyId": "NOTIFY202601070006",
"notifyType": "AGREEMENT_STATUS",
"notifyTime": "2026-01-07T15:30:05+08:00",
"merchantId": "M123456789",
"data": {
"agreementNo": "AGR202601070001",
"externalAgreementNo": "MERCHANT_AGR_001",
"eventType": "UNSIGNED",
"status": "UNSIGNED",
"unsignType": "USER",
"unsignTime": "2026-01-07 15:30:00"
},
}

Suspend Notification

Notifies merchant when an agreement is suspended due to risk control or abnormality.

data Fields

ParameterTypeDescription
agreementNostringPlatform agreement number
externalAgreementNostringMerchant agreement number
eventTypestringEvent type: SUSPENDED
statusstringAgreement status: SUSPENDED
suspendReasonstringSuspend reason: RISK / ABNORMAL / MANUAL
suspendTimestringSuspend time

Example

{
"notifyId": "NOTIFY202601070007",
"notifyType": "AGREEMENT_STATUS",
"notifyTime": "2026-01-07T16:30:05+08:00",
"merchantId": "M123456789",
"data": {
"agreementNo": "AGR202601070001",
"externalAgreementNo": "MERCHANT_AGR_001",
"eventType": "SUSPENDED",
"status": "SUSPENDED",
"suspendReason": "RISK",
"suspendTime": "2026-01-07 16:30:00"
},
}

Resume Notification

Notifies merchant when a suspended agreement returns to normal.

data Fields

ParameterTypeDescription
agreementNostringPlatform agreement number
externalAgreementNostringMerchant agreement number
eventTypestringEvent type: SIGNED
statusstringAgreement status: SIGNED
resumeTimestringResume time

Example

{
"notifyId": "NOTIFY202601070008",
"notifyType": "AGREEMENT_STATUS",
"notifyTime": "2026-01-07T18:30:05+08:00",
"merchantId": "M123456789",
"data": {
"agreementNo": "AGR202601070001",
"externalAgreementNo": "MERCHANT_AGR_001",
"eventType": "SIGNED",
"status": "SIGNED",
"resumeTime": "2026-01-07 18:30:00"
},
}

Sign Timeout Notification

Notifies merchant when sign link/QR code expires.

data Fields

ParameterTypeDescription
agreementNostringPlatform agreement number
externalAgreementNostringMerchant agreement number
agreementTypestringSign type: CYCLE / NON_CYCLE / SINGLE
eventTypestringEvent type: TIMEOUT
statusstringAgreement status: TIMEOUT
userIdstringPlatform user ID
merchantUserIdstringMerchant-side user ID
sceneCodestringScene code
timeoutTimestringTimeout time

Example

{
"notifyId": "NOTIFY202601070011",
"notifyType": "AGREEMENT_STATUS",
"notifyTime": "2026-01-07T11:00:05+08:00",
"merchantId": "M123456789",
"data": {
"agreementNo": "AGR202601070003",
"externalAgreementNo": "MERCHANT_AGR_003",
"agreementType": "CYCLE",
"eventType": "TIMEOUT",
"status": "TIMEOUT",
"userId": "U_123456789",
"merchantUserId": "merchant_user_123",
"sceneCode": "SUBSCRIPTION",
"timeoutTime": "2026-01-07 11:00:00"
},
}