Skip to main content

Refund Order

API Description

Use this API to refund an existing order by merchant order number.

Important Note for Settlement Channel: If using the settlement channel, ensure that the original order was created with a payment address (payAddress parameter). Without this address, the refund cannot be processed.

Interface Information

  • Interface URL: POST /v2/refundOrder
  • Content-Type: application/json
  • Authentication: Need to pass app-id and signature verification in Header
ParameterTypeRequiredDescription
app-idstringYesMerchant Application ID
Content-TypestringYesapplication/json

Request Parameters

ParameterTypeRequiredDescription
signstringYesRequest signature
outTradeNostringYesMerchant order number to refund
payChannelstringYesPayment channel used for the original order

Request Example

{
"sign": "your_signature_here",
"outTradeNo": "ORDER123456789",
"payChannel": "xpay"
}

Response Parameters

Success Response

{
"code": 0,
"data": {
"orderNo": "chainpay_order_no",
"status": "REFUND_PAYMENT",
},
"msg": "success"
}

Error Response

{
"code": 7,
"data": {},
"msg": "Order not found"
}