Skip to main content

Agreement Webhooks

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

eventType Values

Agreement webhooks use the following eventType values: SIGNED, REJECTED, UNSIGNED, SUSPENDED, EXPIRED, TIMEOUT


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
statusstringSign status: SIGNED
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"
},
}
Sign Failure Handling

Sign Rejected Notification​

Notifies merchant when user actively cancels signing on the cashier page.

data Fields​

ParameterTypeDescription
agreementNostringPlatform agreement number
externalAgreementNostringMerchant agreement number
eventTypestringEvent type: REJECTED
statusstringAgreement status: REJECTED
merchantIdstringMerchant ID
failureReasonstringRejection reason

Example​

{
"notifyId": "NOTIFY202601070015",
"notifyType": "AGREEMENT_STATUS",
"notifyTime": "2026-01-07T10:45:00+08:00",
"merchantId": "M123456789",
"data": {
"agreementNo": "AGR202601070003",
"externalAgreementNo": "MERCHANT_AGR_003",
"eventType": "REJECTED",
"status": "REJECTED",
"merchantId": "M123456789",
"failureReason": "User canceled signing"
}
}

Sign Failed Notification (System Error)​

Notifies merchant when sign process fails due to system error (e.g., payment failure in sign-with-pay scenario). Uses notifyType: TRANSACTION_RESULT.

data Fields​

ParameterTypeDescription
agreementNostringPlatform agreement number
externalAgreementNostringMerchant agreement number
eventTypestringEvent type: AGREEMENT_SIGN_RESULT
statusstringStatus: FAILED
merchantIdstringMerchant ID
failureReasonstringFailure reason

Example​

{
"notifyId": "NOTIFY202601070016",
"notifyType": "TRANSACTION_RESULT",
"notifyTime": "2026-01-07T10:45:00+08:00",
"merchantId": "M123456789",
"data": {
"eventType": "AGREEMENT_SIGN_RESULT",
"status": "FAILED",
"agreementNo": "AGR202601070004",
"externalAgreementNo": "MERCHANT_AGR_004",
"merchantId": "M123456789",
"failureReason": "Payment confirmation failed: Insufficient balance"
}
}

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"
},
}

Expired Notification​

Notifies merchant when an agreement expires automatically (reaching validity period set at sign time).

data Fields​

ParameterTypeDescription
agreementNostringPlatform agreement number
externalAgreementNostringMerchant agreement number
eventTypestringEvent type: EXPIRED
statusstringAgreement status: EXPIRED
expireTimestringExpire time

Example​

{
"notifyId": "NOTIFY202601070020",
"notifyType": "AGREEMENT_STATUS",
"notifyTime": "2026-01-07T23:59:05+08:00",
"merchantId": "M123456789",
"data": {
"agreementNo": "AGR202601070001",
"externalAgreementNo": "MERCHANT_AGR_001",
"eventType": "EXPIRED",
"status": "EXPIRED",
"expireTime": "2026-01-07 23:59: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"
},
}