# Refund Notification
When the refund is completed (successful or failed), the payment gateway will initiate a callback notification to the merchant system. If the merchant system does not return correctly, the payment gateway will delay notification again.
# Notification API
Notification
Request URL: This link is set by the parameter notifyUrl submitted through the unified refund API. If the link cannot be accessed, the merchant system will not be able to receive notifications from the payment center.
Request method: POST
Request type: application/x-www-form-urlencoded
* Security: For the production environment, the source of the notification is strongly verified, and the production environment traffic export "Production Environment Traffic Export"
| No. | Outbound IP |
|---|---|
| 1 | 47.89.254.99 |
| 2 | 47.251.5.85 |
| 3 | 198.11.177.112 |
# Notification parameters
| Field Name | Variable Name | Required | Type | Example Value | Description |
|---|---|---|---|---|---|
| Refund Order No | refundOrderId | Yes | String(30) | R20160427210604000490 | Refund order number generated by the payment center |
| Payment Order No | payOrderId | Yes | String(30) | P12021022311124442600 | Return payment system order number |
| Merchant No | mchNo | Yes | String(30) | M1621873433953 | Merchant Number |
| App ID | appId | Yes | String(24) | 60cc09bce4b0f1c0b83761c9 | App ID |
| Merchant Refund Order No | mchRefundNo | Yes | String(30) | 20160427210604000490 | Merchant generated refund order number |
| Payment Amount | payAmount | Yes | int | 100 | Payment amount, in cents |
| Refund Amount | refundAmount | Yes | int | 100 | Refund amount, in cents |
| Currency Code | currency | Yes | String(3) | USD | Three-digit currency code |
| Refund State | state | Yes | int | 2 | Refund status 0-Order generated 1-Refund in progress 2-Refund successful 3-Refund failed 4-Refund closed |
| Channel Error Code | errCode | No | String | 1002 | Channel return error code |
| Channel Error Message | errMsg | No | String | 134586944573118714 | Channel return error description |
| Extended Parameters | extParam | No | String(512) | 134586944573118714 | Merchant extended parameters, which will be returned unchanged during callback |
| Creation Time | createdAt | Yes | long | 1622016572190 | Order creation time, 13-digit timestamp |
| Success Time | successTime | No | long | 1622016572190 | Order payment success time, 13-digit timestamp |
| Notification Request Time | reqTime | Yes | String(30) | 1622016572190 | Notification request time, 13-digit timestamp |
| Signature | sign | Yes | String(32) | C380BEC2BFD727A4B6845133519F3AD6 | Signature value, see signature algorithm for details |
# Return Results
After processing, the business system synchronously returns to the payment center. The return string success means that it has been processed (*success only means that the notification has been received, and has nothing to do with the order status). If an exception occurs in the processing and returns non-success, it means that the processing failed, and the payment center will notify the business system again. (Notification frequency is 0/30/60/90/120/150, unit: seconds)
| State | state | Business System Response |
|---|---|---|
| 2 | Refund successful | success |
| 3 | Refund failed | success |
| 4 | Refund Closed | success |
Attention
The returned string must be lowercase and cannot have spaces or newlines before or after it.
# Notification Example Data
appId=60cc09bce4b0f1c0b83761c9&channelOrderNo=2021061822001423031419593035&createdAt=1623985552769¤cy=USD&mchNo=M1623984572&mchRefundNo=mho1623985552430&payAmount=58&payOrderId=P202106181104177050002&refundAmount=4&refundOrderId=P202106181105527690009&state=2&successTime=1623985554000&sign=4210976D520A0FC7F4E951549E8F087C