# 1.4 Refund Callback

# Request URL
  • /xxx
# Request Method
  • POST
# Request Parameters
参数名 必选 类型 说明
eventName mandatory string event name (payment.refund.success, payment.refund.failed, payment.refund.cancel)
mchRefundOrderId mandatory string Mch Refund Order Id
refundTransactionId mandatory string PayCools Refund Transaction ID
originalTransactionId mandatory string PayCools Origin Transaction ID
refundAmount mandatory int Refund Amount
refundStatus mandatory string Refund Status
refundCreateTime mandatory string Refund Create Time
refundReturnTime mandatory string Refund Return Time
refundReason optional string Refund Reason
failedCode optional int Failed Code
failedMessage optional string Failed Message
sign mandatory string Sign

# sign procss refer to sign procss (opens new window)

# callback example
// payment refund success callback
{
    "eventName": "payment.refund.success",
    "mchRefundOrderId": "CCP20220428011068111", 
    "refundTransactionId": "C4X20220428011068485", 
    "originalTransactionId": "R2022042801106815674", 
    "refundAmount":1000, // units: cents
    "refundStatus":"COMPLETE",
    "refundCreateTime":"2022-05-31 09:38:06",
    "refundReturnTime":"2022-05-31 09:38:06",
    "refundReason":"refund reson",
    "sign": "xxxxxxxxxxxxx"
}

// payment refund failed callback
{
    "eventName": "payment.refund.success",
    "mchRefundOrderId": "CCP20220428011068111", 
    "refundTransactionId": "C4X20220428011068485", 
    "originalTransactionId": "R2022042801106815674", 
    "refundAmount":1000, // units: cents
    "refundStatus":"FAILED",
    "refundCreateTime":"2022-05-31 09:38:06",
    "refundReturnTime":"2022-05-31 09:38:06",
    "refundReason":"refund reson",
    "failedCode": -10009,//Response if refund failed
    "failedMessage": "Channel Refund Failed"//Response if refund failed
    "sign": "xxxxxxxxxxxxx"
}
# Successful Response example
{
    "code":1,
    "msg":"success",
    "data":{
	}
}