Skip to content

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 ​

http
POST <APP custom callback URL>

Request Parameters - Body ​

FieldTypeDefaultRequiredDescription
sud_refund_nostringYesSUD refund number

Return Value ​

The returned JSON data packet

FieldTypeDescription
errcodeint32Error code
errmsgstringError message
envnumberEnvironment configuration 0-production environment, 1-test environment
refund_idstring[Refund number] The unique identifier generated on the payment side for this refund order when the refund request is accepted successfully
sud_refund_nostringSUD refund number
sud_trade_nostringSUD business order number
statusstringRefund 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 ​

json
{
  "sud_refund_no": "sud_refund_20231024123456"
}

Response Data Example ​

json
{
  "errcode": 0,
  "errmsg": "ok",
  "env": 0,
  "refund_id": "50300123420231024567890",
  "sud_refund_no": "sud_refund_20231024123456",
  "sud_trade_no": "sud_20231024123456",
  "status": "REFUNDED"
}