> ## Documentation Index
> Fetch the complete documentation index at: https://opendocs.xft.xin/llms.txt
> Use this file to discover all available pages before exploring further.

# 分账撤销

### 说明

分账成功后，可以申请分账撤销，原路退回

### 请求地址

`POST /profit/sharing/refund`

### 请求参数

| 字段 | 类型 | 必填 | 长度 | 说明 |
| - | - | - | - | - |
| `out_trade_no` | string | 是 | 64 | 原分账申请订单号 |
| `out_refund_no` | string | 是 | 64 | 分账撤销申请单号；建议由调用方生成并保持唯一 |
| `merchant_code` | string | 是 | 64 | 商户号 |
| `attach` | string | 否 | 128 | 备注 |

### 响应参数

| 字段 | 类型 | 说明 |
| - | - | - |
| `out_trade_no` | string | 原分账申请订单号 |
| `merchant_code` | string | 商户号 |
| `state` | string | `succeeded`：接收成功；`fail`：失败 |

附件未提供分账撤销的请求或响应 JSON 示例。建议请求至少使用唯一的 `out_refund_no`，并在接收 `succeeded` 后向平台确认资金终态。

> [!WARNING]
>
> `succeeded` 在原文中被描述为“接收成功”，不能据此推断资金已完成原路退回。若需要资金终态，请向平台确认可查询的状态接口或通知机制。

## 错误响应示例

当 HTTP 状态码不是 `200` 时，将其视为调用失败，并从未加密的响应 body 中读取错误信息：

```json theme={"system"}
{
  "code": "20001",
  "message": "签名验证失败"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.