Skip to content

Refund Result Callback ​

This API must be called on the server side. Never call it directly from the frontend (APP client, web page, mini game, etc.) to avoid the risk of credential leakage.

API Description ​

API English name pay.refundNotify

Description When refund processing completes (succeeded or failed), the APP server calls this API to sync the refund result to SUD.

Note: This API requires secondary encryption and signing of server-to-server communication: request parameters must be encrypted and signed, and responses must be signature-verified and decrypted. This effectively prevents data tampering and leakage.

Call Method ​

HTTPS Call ​

http
POST /v1/pay/refund/notify?access_token=ACCESS_TOKEN

Prepend the base URL for your application's service region to the API path. See Service Regions and API Addresses.

Request Parameters - Query ​

FieldTypeDefaultRequiredDescription
access_tokenstringYesAPI call credential

Request Parameters - Body ​

FieldTypeDefaultRequiredDescription
envnumberYesEnvironment configuration 0-production environment, 1-test environment
refund_idstringYes[Refund number] The unique identifier generated on the payment side for this refund order when the refund request is accepted successfully
sud_refund_nostringYesSUD refund number
sud_trade_nostringYesSUD business order number
statusstringYesRefund order status, enum: REFUNDED-refund succeeded, REFUND_FAIL-refund failed. Only terminal states need to be reported; the in-progress state (REFUNDING) does not. This field represents the refund order's own status

Return Value ​

The returned JSON data packet

FieldTypeDescription
errcodeint32Error code
errmsgstringError message

Call Example ​

Note: The request example below shows the business data before encryption; what is actually sent is the ciphertext with signature headers, and the response example shows the business data after signature verification and decryption. See Server API Signature and Encryption for the packaging and signing rules.

Request Data Example ​

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

Response Data Example ​

json
{
  "errcode": 0,
  "errmsg": "ok"
}