Skip to main content

Transaction Webhooks

Transaction webhooks notify merchants about deduction and refund results. All transaction webhooks use notifyType: TRANSACTION_RESULT.


Deduction Result Notification

Notifies merchant when a deduction is completed or fails.

data Fields

ParameterTypeDescription
orderNostringPlatform order number
tradeNostringPlatform trade number
outTradeNostringMerchant order number
agreementNostringPlatform agreement number
eventTypestringEvent type: PAY
orderTypestringOrder type: PAY
statusstringTransaction status: SUCCESS / FAILED
amountobjectAmount object
amount.totalstringAmount (minimum unit)
amount.currencystringCurrency code
amount.currency_typestringCurrency type
payTimestringPayment time (on success)
failureCodestringFailure error code (on failure, 9-digit string)
failureReasonstringFailure reason description (on failure)

Example (Success)

{
"notifyId": "NOTIFY202601070003",
"notifyType": "TRANSACTION_RESULT",
"notifyTime": "2026-01-07T10:30:05+08:00",
"merchantId": "M123456789",
"data": {
"orderNo": "ORD202601070001",
"tradeNo": "PAY202601070001",
"outTradeNo": "ORDER20260107001",
"agreementNo": "AGR202601070001",
"eventType": "PAY",
"orderType": "PAY",
"status": "SUCCESS",
"amount": {
"total": "2350",
"currency": "USDT",
"currency_type": "CRYPTO"
},
"payTime": "2026-01-07 10:30:00"
},
}

Example (Failure)

{
"notifyId": "NOTIFY202601070004",
"notifyType": "TRANSACTION_RESULT",
"notifyTime": "2026-01-07T10:30:05+08:00",
"merchantId": "M123456789",
"data": {
"orderNo": "ORD202601070002",
"tradeNo": "PAY202601070002",
"outTradeNo": "ORDER20260107002",
"agreementNo": "AGR202601070001",
"eventType": "PAY",
"orderType": "PAY",
"status": "FAILED",
"amount": {
"total": "5000",
"currency": "USDT",
"currency_type": "CRYPTO"
},
"failureCode": "139002003",
"failureReason": "Insufficient balance (downstream code=120100006, msg=Balance insufficient)"
},
}

Refund Result Notification

Notifies merchant when a refund is completed or fails.

data Fields

ParameterTypeDescription
orderNostringPlatform order number
refundNostringPlatform refund number
outRefundNostringMerchant refund number
tradeNostringOriginal trade number
outTradeNostringOriginal merchant order number
agreementNostringPlatform agreement number
eventTypestringEvent type: REFUND
orderTypestringOrder type: REFUND
statusstringRefund status: SUCCESS / FAILED
refund_amountobjectRefund amount object
refundTimestringRefund time (on success)
failureCodestringFailure error code (on failure, 9-digit string)
failureReasonstringFailure reason description (on failure)

Example (Success)

{
"notifyId": "NOTIFY202601070005",
"notifyType": "TRANSACTION_RESULT",
"notifyTime": "2026-01-07T11:30:05+08:00",
"merchantId": "M123456789",
"data": {
"orderNo": "ORD202601070003",
"refundNo": "RF202601070001",
"outRefundNo": "REFUND20260107001",
"tradeNo": "PAY202601070001",
"outTradeNo": "ORDER20260107001",
"agreementNo": "AGR202601070001",
"eventType": "REFUND",
"orderType": "REFUND",
"status": "SUCCESS",
"refund_amount": {
"total": "2350",
"currency": "USDT",
"currency_type": "CRYPTO"
},
"refundTime": "2026-01-07 11:30:00"
},
}

Example (Failure)

{
"notifyId": "NOTIFY202601070010",
"notifyType": "TRANSACTION_RESULT",
"notifyTime": "2026-01-07T11:30:05+08:00",
"merchantId": "M123456789",
"data": {
"orderNo": "ORD202601070004",
"refundNo": "RF202601070002",
"outRefundNo": "REFUND20260107002",
"tradeNo": "PAY202601070001",
"outTradeNo": "ORDER20260107001",
"agreementNo": "AGR202601070001",
"eventType": "REFUND",
"orderType": "REFUND",
"status": "FAILED",
"refund_amount": {
"total": "2350",
"currency": "USDT",
"currency_type": "CRYPTO"
},
"failureCode": "139002003",
"failureReason": "Insufficient balance (downstream code=120100006, msg=Balance insufficient)"
},
}

Order Timeout Notification

Notifies merchant when a deduction order times out without completion.

data Fields

ParameterTypeDescription
orderNostringPlatform order number
tradeNostringPlatform trade number
outTradeNostringMerchant order number
agreementNostringPlatform agreement number
eventTypestringEvent type: PAY
orderTypestringOrder type: PAY / REFUND
statusstringOrder status: TIMEOUT
userIdstringPlatform user ID
merchantUserIdstringMerchant-side user ID
amountobjectAmount object
amount.totalstringAmount (minimum unit)
amount.currencystringCurrency code
amount.currency_typestringCurrency type
failureReasonstringFailure reason
timeoutTimestringTimeout time

Example

{
"notifyId": "NOTIFY202601070012",
"notifyType": "TRANSACTION_RESULT",
"notifyTime": "2026-01-07T12:00:05+08:00",
"merchantId": "M123456789",
"data": {
"orderNo": "ORD202601070010",
"tradeNo": "PAY202601070010",
"outTradeNo": "ORDER20260107010",
"agreementNo": "AGR202601070001",
"eventType": "PAY",
"orderType": "PAY",
"status": "TIMEOUT",
"userId": "U_123456789",
"merchantUserId": "merchant_user_123",
"amount": {
"total": "5000",
"currency": "USDT",
"currency_type": "CRYPTO"
},
"failureReason": "ORDER_TIMEOUT",
"timeoutTime": "2026-01-07 12:00:00"
},
}