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

# 创建收款人

> 创建收款人

完整[认证、签名、数据约定与错误响应](https://docs.stablepayfi.ai/zh/api/global-accounts/overview)。每次重试均须重新生成时间戳、nonce 与签名。

`POST /recipient` 创建打款目的方，type、currency 与 `is_third_party` 创建后不可改。

## 请求头

**Authorization** `string` *required*

Bearer API Key。

**X-StablePay-Timestamp** `string` *required*

Unix 秒，允许与服务端相差最多 5 分钟。

**X-StablePay-Nonce** `string` *required*

每次请求唯一的随机串，16–64 字符。

**X-StablePay-Signature** `string` *required*

HMAC-SHA256 签名，小写十六进制；签名必须对应实际发送的请求体。

**Idempotency-Key** `string`

幂等键

## 请求参数

**merchant\_id** `string`

10 位数字；商户 App 不传，服务商 App 必传

**external\_recipient\_id** `string`

业务参考号

**type** `string` *required*

`stablecoin_address` 或 `fiat_account`

**currency** `string` *required*

打款币种

**is\_third\_party** `boolean` *required*

true 第三方、false 本主体

**name** `string`

展示名称，最长 140 字符

**network** `string`

`stablecoin_address` 时必填

**details** `object` *required*

地址与 memo，或银行字段

## 响应

**recipient\_id** `string` *required*

收款人 ID，10 位数字

**merchant\_id** `string` *required*

商户 ID

**external\_recipient\_id** `string`

业务参考号

**type** `string` *required*

`stablecoin_address` 或 `fiat_account`

**currency** `string` *required*

打款币种

**is\_third\_party** `boolean` *required*

是否第三方

**name** `string`

展示名称

**network** `string`

稳定币地址网络

**details** `object` *required*

地址与 memo，或银行字段

**created** `integer` *required*

创建时间

**updated** `integer`

更新时间

## 状态与错误

400 参数不合法或缺少必填银行字段。

```bash cURL theme={"system"}
curl --request POST \
  --url "https://api.stablepay.co/api/v1/recipient" \
  --header "Authorization: Bearer <API_KEY>" \
  --header "X-StablePay-Timestamp: <TIMESTAMP>" \
  --header "X-StablePay-Nonce: <NONCE>" \
  --header "X-StablePay-Signature: <SIGNATURE>" \
  --header "Content-Type: application/json" \
  --data '{
  "type": "stablecoin_address",
  "currency": "USDC",
  "is_third_party": true,
  "name": "Supplier A",
  "network": "solana",
  "details": {
    "address": "4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YymTvAVmRoz"
  }
}'
```

```javascript JavaScript theme={"system"}
const response = await fetch("https://api.stablepay.co/api/v1/recipient", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <API_KEY>",
    "X-StablePay-Timestamp": "<TIMESTAMP>",
    "X-StablePay-Nonce": "<NONCE>",
    "X-StablePay-Signature": "<SIGNATURE>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "type": "stablecoin_address",
    "currency": "USDC",
    "is_third_party": true,
    "name": "Supplier A",
    "network": "solana",
    "details": {
      "address": "4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YymTvAVmRoz"
    }
  })
});
console.log(await response.json());
```

```json 200 theme={"system"}
{
  "recipient_id": "9000000080",
  "merchant_id": "2000000001",
  "type": "stablecoin_address",
  "currency": "USDC",
  "is_third_party": true,
  "name": "Supplier A",
  "network": "solana",
  "details": {
    "address": "4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YymTvAVmRoz"
  },
  "created": 1718726401
}
```


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