leapcat-kyc

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

LeapCat KYC Verification Skill

LeapCat KYC验证Skill

Guide a user through the full Know Your Customer (KYC) verification process using the leapcat. Covers document upload, personal information submission, agreements, and status polling.
引导用户使用leapcat完成完整的Know Your Customer(KYC,了解你的客户)验证全流程,涵盖文档上传、个人信息提交、协议签署和状态轮询。

Prerequisites

前置条件

  • Node.js 18+ is required (commands use
    npx leapcat@latest
    which auto-downloads the CLI)
  • User must be authenticated — run
    npx leapcat@latest auth login --email <email>
    first
  • Identity document images (e.g., passport, national ID) must be available as local files
  • 需要安装Node.js 18+(命令使用
    npx leapcat@latest
    会自动下载CLI)
  • 用户必须完成身份认证 — 请先运行
    npx leapcat@latest auth login --email <email>
  • 身份证件图片(例如护照、身份证)需已保存为本地文件

Commands

命令

upload (file upload utility)

upload(文件上传工具)

Upload an image file and receive a URL + key for use in subsequent KYC commands.
bash
npx leapcat@latest upload --file <path-to-file> --json
Parameters:
  • --file <path>
    — Path to a local image file (JPG, PNG, PDF)
Response:
json
{ "url": "https://...", "key": "uploads/..." }
上传图片文件并获取URL和密钥,供后续KYC命令使用。
bash
npx leapcat@latest upload --file <path-to-file> --json
参数:
  • --file <path>
    — 本地图片文件路径(支持JPG、PNG、PDF格式)
响应:
json
{ "url": "https://...", "key": "uploads/..." }

kyc status

kyc status

Check the current KYC verification status.
bash
npx leapcat@latest kyc status --json
查询当前KYC验证状态。
bash
npx leapcat@latest kyc status --json

kyc detail

kyc detail

Get detailed KYC information including submitted data and review notes.
bash
npx leapcat@latest kyc detail --json
获取KYC详细信息,包括已提交的数据和审核备注。
bash
npx leapcat@latest kyc detail --json

kyc consent

kyc consent

Submit user consent to begin the KYC process.
bash
npx leapcat@latest kyc consent --json
提交用户同意书,启动KYC验证流程。
bash
npx leapcat@latest kyc consent --json

kyc documents

kyc documents

Submit identity document information (type, URLs from upload).
bash
npx leapcat@latest kyc documents --json
Parameters (interactive or via stdin):
  • Document type (e.g., PASSPORT, NATIONAL_ID)
  • Front image URL (from
    upload
    command)
  • Back image URL (from
    upload
    command, if applicable)
提交身份证件信息(证件类型、upload命令返回的URL)。
bash
npx leapcat@latest kyc documents --json
参数(交互式填写或通过标准输入传入):
  • 证件类型(例如PASSPORT、NATIONAL_ID)
  • 证件正面图片URL(来自
    upload
    命令返回结果)
  • 证件背面图片URL(来自
    upload
    命令返回结果,如适用)

kyc personal-info

kyc personal-info

Submit personal information (name, date of birth, address, etc.).
bash
npx leapcat@latest kyc personal-info --json
提交个人信息(姓名、出生日期、地址等)。
bash
npx leapcat@latest kyc personal-info --json

kyc supplementary

kyc supplementary

Submit supplementary documents if requested during review.
bash
npx leapcat@latest kyc supplementary --json
如审核过程中要求补充材料,可通过此命令提交补充文档。
bash
npx leapcat@latest kyc supplementary --json

kyc agreements

kyc agreements

Accept the required legal agreements and disclosures.
bash
npx leapcat@latest kyc agreements --json
确认接受所需的法律协议和披露条款。
bash
npx leapcat@latest kyc agreements --json

kyc submit

kyc submit

Submit the completed KYC application for review.
bash
npx leapcat@latest kyc submit --json
提交填写完成的KYC申请进入审核环节。
bash
npx leapcat@latest kyc submit --json

Workflow

操作流程

  1. Check status — Run
    kyc status --json
    to see where the user is in the KYC process.
  2. Consent — If status is
    NOT_STARTED
    , run
    kyc consent --json
    to begin.
  3. Upload documents — Upload each identity document image:
    bash
    npx leapcat@latest upload --file ./id-front.jpg --json
    npx leapcat@latest upload --file ./id-back.jpg --json
  4. Submit document metadata — Run
    kyc documents --json
    and provide the document type and uploaded URLs.
  5. Personal information — Run
    kyc personal-info --json
    and fill in user details.
  6. Supplementary documents (optional) — If the KYC status indicates supplementary docs are needed, upload and submit via
    kyc supplementary --json
    .
  7. Agreements — Run
    kyc agreements --json
    to accept legal terms.
  8. Submit for review — Run
    kyc submit --json
    to finalize the application.
  9. Poll status — Periodically run
    kyc status --json
    until the status changes to
    APPROVED
    or
    REJECTED
    .
  1. 查询状态 — 运行
    kyc status --json
    查看用户当前处于KYC流程的哪个阶段。
  2. 同意协议 — 如果状态为
    NOT_STARTED
    ,运行
    kyc consent --json
    启动流程。
  3. 上传证件 — 上传每张身份证件图片:
    bash
    npx leapcat@latest upload --file ./id-front.jpg --json
    npx leapcat@latest upload --file ./id-back.jpg --json
  4. 提交证件元数据 — 运行
    kyc documents --json
    ,提供证件类型和上传后得到的URL。
  5. 填写个人信息 — 运行
    kyc personal-info --json
    填写用户详细信息。
  6. 补充材料(可选) — 如果KYC状态提示需要补充材料,上传文件后通过
    kyc supplementary --json
    提交。
  7. 确认法律协议 — 运行
    kyc agreements --json
    接受法律条款。
  8. 提交审核 — 运行
    kyc submit --json
    完成申请提交。
  9. 轮询状态 — 定期运行
    kyc status --json
    ,直到状态变为
    APPROVED
    (审核通过)或
    REJECTED
    (审核驳回)。

Error Handling

错误处理

ErrorCauseResolution
NOT_AUTHENTICATED
Session expiredRe-authenticate with
auth login
KYC_ALREADY_SUBMITTED
KYC application already under reviewWait for review; check with
kyc status --json
KYC_ALREADY_APPROVED
KYC already completedNo action needed — user is verified
INVALID_DOCUMENT
Uploaded file is unreadable or wrong formatRe-upload with a clearer image
MISSING_FIELDS
Required personal info fields are emptyRe-run
kyc personal-info
with all required fields
UPLOAD_FAILED
File upload errorRetry
upload --file
; check file path and format
错误码原因解决方法
NOT_AUTHENTICATED
会话过期使用
auth login
重新认证
KYC_ALREADY_SUBMITTED
KYC申请已提交,正在审核中等待审核,可通过
kyc status --json
查询进度
KYC_ALREADY_APPROVED
KYC已审核通过无需操作,用户已完成验证
INVALID_DOCUMENT
上传的文件无法读取或格式错误重新上传更清晰的有效格式图片
MISSING_FIELDS
个人信息必填字段为空重新运行
kyc personal-info
并填写所有必填字段
UPLOAD_FAILED
文件上传失败重试
upload --file
命令,检查文件路径和格式是否正确