Skip to content

Refund

Updated: 9/16/26, 11:08:10 AM

Description

Refund a successfully paid order. Supports partial and full refunds.

Notes:

  • The refund amount cannot exceed the refundable balance of the order (refundableBalance returned by order query)
  • For multiple refunds against the same order, bizRefundNo must be unique (auto-generated if omitted)
  • Refund is asynchronous: after the API returns progress, confirm the final state via async notification or Refund Sync

Endpoint

POST /unipay/refund

  • Auth: RSA signature (@PaymentVerify)
  • Response: DaxResult<RefundResult>

Request Parameters

Common parameters follow Pay - Common Parameters. Business parameters:

ParameterTypeRequiredMax LengthDescription
tradeNostringno*100Original payment funds trade number (platform tradeNo)
bizOrderNostringno*100Original merchant order number
amountlongyesRefund amount in cents (must be > 0)
reasonstringno50Refund reason
bizRefundNostringno100Merchant refund number (auto-generated if omitted)

*At least one of tradeNo / bizOrderNo is required; tradeNo takes precedence.

Request Example

json
{
  "mchNo": "M200000001",
  "appId": "APP001",
  "reqId": "REQ20241201002",
  "reqTime": "2024-12-01 12:30:00",
  "nonceStr": "RANDOMSTR123",
  "sign": "Base64Signature",
  "bizOrderNo": "ORDER20241201001",
  "amount": 100,
  "bizRefundNo": "REFUND20241201001",
  "reason": "Customer requested refund"
}

Response Parameters

DaxResult<RefundResult>, structure of data:

ParameterTypeDescription
refundNostringPlatform refund number
bizRefundNostringMerchant refund number
statusstringRefund status (RefundOrderStatusEnum)
errorMsgstringError message (returned on failure)

Response Example

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "refundNo": "R2024120112345700001",
    "bizRefundNo": "REFUND20241201001",
    "status": "progress"
  },
  "sign": "Base64Signature",
  "resTime": "2024-12-01 12:30:00",
  "reqId": "REQ20241201002"
}

Refund Status (RefundOrderStatusEnum)

statusDescription
progressRefunding (created and submitted to channel, awaiting result)
successRefund successful
failRefund failed
closeRefund closed (e.g. not confirmed before timeout)

Refund Callback

After a refund succeeds, the platform sends an async notification with event=refund.success to the notifyUrl of the original payment order. See Async Callback for the message structure.

Official Website · Released under the GNU LGPL v3.0