> ## 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** mutation 來啟動驗證。驗證結果會立即處理。

<Note>
  **地址格式**

  使用結構化欄位提交使用者的居住地址，且城市、州別與 ZIP/郵遞區號需一致。KYC 接受國際地址。格式錯誤或不一致的地址可能導致驗證被拒。請參閱 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** mutation 來請求一個驗證連結，之後將其傳送給您的使用者。使用者可於任意時間進行文件驗證，且在完成後，驗證結果會立即處理。

**📘 請參考以下程式碼範例以請求文件驗證連結：**

```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 />*User already KYC verified*<br />*Exceeded user verification limit*<br />*Exceeded document verification limit*<br /> |

<br />

<br />
