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

# 用户 KYC 验证

Fluz 要求用户通过 KYC 验证才能执行某些交易，或以更高的限额执行这些交易。Fluz 提供两种身份验证类型。

对于 SSN 验证，您可以使用 **verifyUserInformation** 变更来发起验证。验证结果会立即处理。

<Note>
  **地址格式**

  使用结构化字段提交用户的居住地址，并确保城市、州和邮政编码一致。KYC 接受国际地址。格式错误或不匹配的地址可能导致验证被拒绝（DECLINED）。有关格式规则，请参阅 Address Formatting Requirements。
</Note>

**请参见以下代码示例以验证用户信息：**

```javascript theme={null}
import { GraphQLClient, gql } from 'graphql-request';

const API_URL = 'https://transactional-graph.fluzapp.com/api/v1/graphql';

const VERIFY_USER_INFORMATION = gql`
  mutation verifyUserInformation {
    verifyUserInformation(
      input: {
        firstName: "John"
        lastName: "Smith"
        streetLine1: "123 Main St"
        streetLine2: ""
        city: "Los Angeles"
        state: "CA"
        postalCode: "91234"
        country: "United States"
        dateOfBirth: "01/28/1975"
        ssnLast4: "1234"
      }
    ) {
      status
      message
    }
  }
`;

const client = new GraphQLClient(API_URL, {
  headers: {
    Authorization: `Bearer <<USER_ACCESS_TOKEN>>`,
    'Content-Type': 'application/json',
  },
});

const response = await client.request(VERIFY_USER_INFORMATION);
console.log(response);
```

对于文档验证，您可以使用 **requestDocumenVerificationLink** 变更来请求一个验证链接，然后将其发送给您的用户。用户可以在任何时间完成文档验证，用户完成后验证结果会立即处理。

**📘 请参见以下代码示例以请求文档验证链接：**

```javascript theme={null}
import { GraphQLClient, gql } from 'graphql-request';

const API_URL = 'https://transactional-graph.fluzapp.com/api/v1/graphql';

const REQUEST_DOC_VERIFICATION = gql`
  mutation RequestDocumentVerificationLink($input: RequestDocumentVerificationLinkInput!) {
    requestDocumentVerificationLink(input: $input) {
      userId
      verificationType
      verificationId
      verificationUrl
      status
      message
    }
  }
`;

const client = new GraphQLClient(API_URL, {
  headers: {
    Authorization: `Bearer <<USER_ACCESS_TOKEN>>`,
    'Content-Type': 'application/json',
  },
});

const response = await client.request(REQUEST_DOC_VERIFICATION, {
  input: {
    gaveConsent: true,
    prefillData: true,
  },
});

console.log(response);
```

### 用户 KYC 验证响应

| 状态        | 消息        | 说明                                                                              |
| :-------- | :-------- | :------------------------------------------------------------------------------ |
| APPROVED  | 用户验证成功    | 用户已通过 KYC 验证                                                                    |
| DECLINED  | 验证被拒绝     | 用户未通过 KYC 验证                                                                    |
| DUPLICATE | 重复的用户验证   | 用户已通过 KYC 验证，但数据与其他用户匹配                                                         |
| ERROR     | 用户验证时遇到错误 | 错误可能包括以下情况：<br /><br />*用户已完成 KYC 验证*<br />*超出用户验证次数限制*<br />*超出文档验证次数限制*<br /> |

<br />

<br />
