Sync Refund
Description
Actively sync refund status from the payment channel. Called when refund status is progress, to fetch the latest result. Useful when channel callbacks are delayed or manual confirmation is needed.
Request
POST /mch/order/refund/sync?id={refundOrderId}
- Auth: Sa-Token (
Accesstokenheader) - Response:
Result<RefundOrderResult>
Parameter is in query string
id is a query parameter (@RequestParam), not request body. The body should be empty.
Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
| id | query | long | Yes | Refund order ID (numeric) |
Example
http
POST /mch/order/refund/sync?id=1853123456789012345 HTTP/1.1
Host: your-domain.com
Accesstoken: xxxx-xxxx-xxxx
Content-Type: application/jsonResponse
Result<RefundOrderResult>, data structure same as Refund - Response. Main fields returned:
| Field | Type | Description |
|---|---|---|
| id | long | Refund order ID |
| refundNo | string | System refund number |
| status | string | Refund status after sync (RefundOrderStatusEnum) |
| finishTime | string | Refund completion time (UTC) |
| errorMsg | string | Error message (on failure) |
Example
json
{
"code": 0,
"message": "success",
"data": {
"id": "1853123456789012345",
"refundNo": "R2024120112345700001",
"status": "success",
"finishTime": "2024-12-01T06:00:00Z"
}
}