Query Refund Status
This is a callback API implemented by the APP server and provided to SUD to call. SUD queries the refund status from the APP server through this API.
API Description
API English name pay.refundQuery
Description Query refund status. SUD OP SVR queries the processing status and details of a specified refund order from the APP server through this callback API.
Note: This API requires secondary encryption and signing of server-to-server communication: the callback request must be signature-verified before any business logic runs. This effectively prevents data tampering and leakage.
Call Method
HTTPS Call
POST <APP custom callback URL>Request Parameters - Body
| Field | Type | Default | Required | Description |
|---|---|---|---|---|
| sud_refund_no | string | Yes | SUD refund number |
Return Value
The returned JSON data packet
| Field | Type | Description |
|---|---|---|
| errcode | int32 | Error code |
| errmsg | string | Error message |
| env | number | Environment configuration 0-production environment, 1-test environment |
| refund_id | string | [Refund number] The unique identifier generated on the payment side for this refund order when the refund request is accepted successfully |
| sud_refund_no | string | SUD refund number |
| sud_trade_no | string | SUD business order number |
| status | string | Refund order status, enum: REFUNDING-refund processing, REFUNDED-refund succeeded, REFUND_FAIL-refund failed. This field represents the refund order's own status |
Call Example
Note: The request example below shows the business data after decryption; what actually arrives is ciphertext with signature headers, which must be verified and decrypted before parsing. The response example shows the business data before encryption; the actual response must be encrypted first and the ciphertext then signed. See Callback Signature and Encryption for the full rules.
Request Data Example
{
"sud_refund_no": "sud_refund_20231024123456"
}Response Data Example
{
"errcode": 0,
"errmsg": "ok",
"env": 0,
"refund_id": "50300123420231024567890",
"sud_refund_no": "sud_refund_20231024123456",
"sud_trade_no": "sud_20231024123456",
"status": "REFUNDED"
}