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
Parameter | Type | Required | Description |
---|---|---|---|
app-id | string | Yes | Merchant Application ID |
Content-Type | string | Yes | application/json |
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
sign | string | Yes | Request signature |
outTradeNo | string | Yes | Merchant order number to refund |
payChannel | string | Yes | Payment 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"
}