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

# 划转待处理资金

> 在 VelaFi 平台内将法币余额从一个商户的待处理资金账户即时划转至另一个商户，无需银行转账。

使用此端点在 VelaFi 系统内的两个商户账户之间划转法币资金。该划转为内部操作，无需银行交易。转出和转入商户都必须拥有与指定 `fiat` 和 `paymentId` 组合对应的有效账户。发起划转前，请先使用[划转手续费](https://docs.velafi.com/cn/api-reference/merchant/get-transfer-pending-funds-fee.md)端点查询适用的费用。

> [!NOTE]
>
> 所有请求都必须包含 `X-BH-TOKEN` 请求头和 `Content-Type: application/json`。`clientId` 用于保证幂等性——重复的 `clientId` 值将返回原始结果。

## 端点

`POST https://api.velafi.com/v2/merchant/transfer`

## 请求参数

**clientId** `string` *required*

您为此次划转设置的唯一标识符。用于去重和追踪。

**fromMerchantId** `number` *required*

转出资金的商户 ID。

**toMerchantId** `number` *required*

接收资金的商户 ID。

**fiat** `string` *required*

要划转的法币。支持的值：`MXN`、`ARS`、`COP`、`BRL`、`PEN`。

**paymentId** `number` *required*

与法币对应的支付渠道 ID：

* `105` 或 `72` — MXN
* `63` — ARS
* `68` — COP
* `90` — BRL
* `95` — PEN

**fiatAmount** `number` *required*

以指定法币计价的划转金额。

## 响应字段

**code** `number`

HTTP 风格的响应码。`200` 表示成功。

**msg** `string`

可读的状态消息，例如 `SUCCESS`。

**data** `object`

**data 字段**

**clientId** `string`

原样返回的您提供的客户端标识符。

**fromId** `number`

转出方账户上的资金记录 ID（借记条目）。

**toId** `number`

接收方账户上的资金记录 ID（贷记条目）。

**fiat** `string`

划转的法币。

**fiatAmount** `string`

实际划转的净金额。

**totalFiatAmount** `string`

从转出方扣除的总金额（fiatAmount + 手续费）。

**fee** `string`

此次划转收取的手续费。

**createTime** `number`

划转创建时间的 Unix 时间戳（毫秒）。

## 示例

> [tab] MXN
>
> ```bash cURL theme={null}
> curl -X POST https://api.velafi.com/v2/merchant/transfer \
>   -H "X-BH-TOKEN: YOUR_TOKEN" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "clientId": "transfer-mxn-001",
>     "fromMerchantId": 434,
>     "toMerchantId": 5,
>     "fiat": "MXN",
>     "paymentId": 105,
>     "fiatAmount": 10
>   }'
> ```
>
> ```json Response theme={null}
> {
>   "code": 200,
>   "msg": "SUCCESS",
>   "data": {
>     "clientId": "transfer-mxn-001",
>     "fromId": 521006138624569344,
>     "toId": 521006138641346560,
>     "fiat": "MXN",
>     "fiatAmount": "10",
>     "totalFiatAmount": "10",
>     "fee": "0",
>     "createTime": 1746694343261
>   }
> }
> ```

> [tab] ARS
>
> ```json Request body theme={null}
> {
>   "clientId": "transfer-ars-001",
>   "fromMerchantId": 434,
>   "toMerchantId": 5,
>   "fiat": "ARS",
>   "paymentId": 63,
>   "fiatAmount": 10
> }
> ```
>
> ```json Response theme={null}
> {
>   "code": 200,
>   "msg": "SUCCESS",
>   "data": {
>     "clientId": "transfer-ars-001",
>     "fromId": 521006138624569345,
>     "toId": 521006138641346561,
>     "fiat": "ARS",
>     "fiatAmount": "10",
>     "totalFiatAmount": "10",
>     "fee": "0",
>     "createTime": 1746694343261
>   }
> }
> ```

> [tab] COP / BRL / PEN
>
> ```json COP Request body theme={null}
> {
>   "clientId": "transfer-cop-001",
>   "fromMerchantId": 15127301,
>   "toMerchantId": 15127302,
>   "fiat": "COP",
>   "paymentId": 68,
>   "fiatAmount": 10
> }
> ```
>
> ```json BRL Request body theme={null}
> {
>   "clientId": "transfer-brl-001",
>   "fromMerchantId": 15127301,
>   "toMerchantId": 15127302,
>   "fiat": "BRL",
>   "paymentId": 90,
>   "fiatAmount": 10
> }
> ```
>
> ```json PEN Request body theme={null}
> {
>   "clientId": "transfer-pen-001",
>   "fromMerchantId": 15127301,
>   "toMerchantId": 15127302,
>   "fiat": "PEN",
>   "paymentId": 95,
>   "fiatAmount": 10
> }
> ```

> [!NOTE]
>
> 使用 `fromId` 和 `toId` 值在资金记录端点中查找对应条目，以获取完整的审计轨迹。


## Related topics

- [提取待处理资金](https://docs.velafi.com/cn/api-reference/merchant/claim-pending-fund.md)
- [获取资金记录](https://docs.velafi.com/cn/api-reference/merchant/retrieve-funding-records.md)
- [资金记录事件](https://docs.velafi.com/cn/api-reference/webhooks/funding-records-message-push.md)
- [Webhook](https://docs.velafi.com/cn/docs/guides/webhooks.md)
- [获取转账手续费](https://docs.velafi.com/cn/api-reference/merchant/get-transfer-pending-funds-fee.md)


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