> ## 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 与签名。

`GET /recipient/requirements` 返回 details 各字段的必填性与格式约束，用于动态渲染表单。

## 请求头

**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 签名，小写十六进制；签名必须对应实际发送的请求体。

## 请求参数

**merchant\_id** `string`

10 位数字；商户 App 不传，服务商 App 传值指定作用商户

**type** `string` *required*

`stablecoin_address` 或 `fiat_account`

**currency** `string`

type=`fiat_account` 时必传

## 响应

**recipient\_requirements** `object` *required*

字段规则对象

**recipient\_requirements.type** `string` *required*

收款人类型

**recipient\_requirements.currency** `string`

规则适用的法币币种

**recipient\_requirements.fields** `array` *required*

字段规则列表

**field** `string` *required*

details 字段名

**required** `boolean` *required*

是否必填

**type** `string` *required*

string 或 integer

**max\_length** `integer`

最大长度

**pattern** `string`

正则约束

**description** `string` *required*

字段说明

**example** `string`

示例值

## 状态与错误

404 币种不支持。

```bash cURL theme={"system"}
curl --request GET \
  --url "https://api.stablepay.co/api/v1/recipient/requirements?type=<TYPE>" \
  --header "Authorization: Bearer <API_KEY>" \
  --header "X-StablePay-Timestamp: <TIMESTAMP>" \
  --header "X-StablePay-Nonce: <NONCE>" \
  --header "X-StablePay-Signature: <SIGNATURE>"
```

```javascript JavaScript theme={"system"}
const response = await fetch("https://api.stablepay.co/api/v1/recipient/requirements?type=<TYPE>", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <API_KEY>",
    "X-StablePay-Timestamp": "<TIMESTAMP>",
    "X-StablePay-Nonce": "<NONCE>",
    "X-StablePay-Signature": "<SIGNATURE>"
  }
});
console.log(await response.json());
```

```json 200 theme={"system"}
{
  "recipient_requirements": {
    "type": "fiat_account",
    "currency": "USD",
    "fields": [
      {
        "field": "account_holder_name",
        "required": true,
        "type": "string",
        "max_length": 140,
        "description": "Account holder name",
        "example": "John Smith"
      },
      {
        "field": "account_number",
        "required": true,
        "type": "string",
        "pattern": "^[0-9]{6,17}$",
        "description": "Local account number",
        "example": "012345678901"
      }
    ]
  }
}
```


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