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

# 创建信用报告

> 为主体（个人或企业）签发一份新的信用报告，在签发时按独立费用 （`risk_report_person` / `risk_report_company`）计费。幂等性是强制的： 使用相同的 `idempotency_key` 重试会返回原始报告并带 `idempotency_hit: true`， 绝不重复收费。报告是同步计算的：响应通常是已完成的报告（status `ready`） 或失败的报告（status `failed`，带 `error_code`/`error_message`）。 `purpose` 字段为必填（数据保护法要求），`doc_id` 会按国家/地区验证并 规范化（例如带校验位的智利 RUT）。



## OpenAPI

````yaml /openapi.zh.yaml post /v1/qscore/reports
openapi: 3.1.0
info:
  title: CBPay API
  version: '2.62'
  description: >
    CBPay 是一个多币种支付平台:覆盖拉美的法币付款(payout)与收款(payin)、内部转账、链上充值与提现,以及 KYC
    筛查。每个账户持有四个相互独立的虚拟余额——USDT(运营货币)、USDC、BTC 和 GOLD(纯金克数)——可通过兑换(swap)按需转换。

    payout 和服务费可从四个余额中的任意一个支付(用 `PUT /v1/settlement`

    设置默认值,或在单笔 payout 中用 `settlement_asset` 覆盖);payin

    可自动兑换为你选择的资产(`default_payin_asset`)。


    所有金额均为十进制字符串,遵循各货币的精度(USDT/USDC/GOLD 为 6 位小数,BTC 为 8 位)。错误始终返回

    `{"error": "<code>", "message": "<detail>"}`。
servers:
  - url: https://api.qbank.cl/platform
    description: Live（生产环境，真实资金）
  - url: https://cryptobank.qbank.cl/platform
    description: Test（沙盒，模拟资金 — pk_test_ 密钥）
security:
  - bearerAuth: []
tags:
  - name: 凭证
    description: >-
      每笔操作的品牌化 PDF 凭证,附带公开的签名 QR 真伪校验、每个响应/webhook 中的
      receipt_url,以及最终状态时的自动邮件发送。
  - name: 身份认证
    description: 注册与登录账户成员。会话有效期 24 小时。
  - name: 账户
    description: 调用账户的档案、成员与 API key。
  - name: 余额
    description: 余额、流水历史与外汇汇率。
  - name: 付款(Payouts)
    description: 从你选择的结算余额扣款的法币派发(默认 USDT)。
  - name: 收款(Payins)
    description: 法币充值(二维码、转账、专属账户、pull 收款、卡片、checkout 链接)自动入账——默认入账 USDT,也可自动兑换为你选择的结算资产。
  - name: 收银台(Checkout)
    description: >-
      通用收银台链接(`POST /v1/payins`,`method:
      "checkout"`)与公开支付页端点——多国法币、每个链接专属临时钱包的加密货币支付,以及 CBPay 直接支付,按你选择的资产结算。
  - name: 已保存卡片(Stored cards)
    description: 在 3-D Secure 支付中经付款人明确同意保存的卡片(COF)。可列出、吊销并按需扣款(MIT),无需再次索要卡片信息。
  - name: 订阅(Subscriptions)
    description: 由平台调度器管理的已保存卡片周期性扣款——按日、周、月或年,支持暂停/恢复/取消与自动催收。
  - name: 转账
    description: CBPay 账户之间的免费内部转账(个人或企业,任意组合)。
  - name: 联系人
    description: 按账户维护的收款人通讯录(CBPay、银行与加密货币目的地),支持手机号匹配与每次发送时自动保存。
  - name: 兑换(Swaps)
    description: 按账户报价即时兑换账户的 USDT、USDC、BTC 与 GOLD 余额。
  - name: 加密货币
    description: 链上充值与提现(TRON、Ethereum 和 Bitcoin)。
  - name: 隔离钱包
    description: 拥有自身余额的链上钱包(企业不限数量;个人每个网络+资产组合 1 个)——创建、导入、发送、导出私钥与自动转发。余额存在于链上,从不进入账本。
  - name: 签名证明
    description: 使用钱包进行加密消息签名(EIP-191 ETH/EVM、TIP-191 TRON)——创建、列出、查询和吊销具有公开验证功能的签名证明。
  - name: 钱包链接
    description: 通过签名 nonce 挑战将外部钱包(custody=client)链接到你的账户——创建挑战、验证签名、列出和吊销链接。
  - name: QR Crypto POS
    description: >-
      面向拥有实体 POS 终端的处理商（企业账户）的定额加密货币二维码收款：已验证商户、每笔收款专属地址 +
      二维码、支付早期检测、按商户对账，以及经加密货币提现通道的退款。
  - name: KYC / KYB
    description: 身份验证:个人 KYC、企业 KYB——你自己的入驻验证,以及企业账户的第三方验证。
  - name: AML 筛查
    description: 针对个人与企业的独立 AML 筛查(制裁、PEP 与负面媒体名单),含重新筛查、持续监控与可下载的 PDF 报告。
  - name: 钱包筛查
    description: 区块链地址的 AML 风险评估(制裁、非法资金暴露),按次收费;另附提现与充值的免费自动防护。
  - name: Qscore
    description: >-
      API 优先的信用局。签发完整的信用报告，评分为 1-999（A-E 等级，无数据时为 SC），查询主体的最新评分，并管理 ARCO
      争议。智利先行，设计上与国家无关。每份签发的报告都带有公开验证码。
  - name: 分析
  - name: Webhooks
    description: 接收签名事件通知的订阅。
  - name: 状态
    description: 服务可用性。
  - name: 银行服务
    description: 真实银行账户:通过国际银行通道接收、持有与发送资金。
  - name: 卡片
    description: 以 Just-In-Time 方式从你选择的余额(USDT、USDC、BTC 或 GOLD)消费的虚拟卡与实体卡,支持按卡设置消费限额。
  - name: 安全(OTP)
    description: >-
      通过 SMS/WhatsApp/email 发送的一次性验证码,保护敏感操作;并提供自助 2FA 偏好设置。仅适用于用户会话——API key
      豁免。
  - name: 通行密钥
    description: >-
      通过 WebAuthn 使用设备生物识别(Face ID、Touch ID、Windows
      Hello、安全密钥)的无密码登录、带备份码的验证器应用(TOTP),以及会话/设备管理。
  - name: 社交登录
    description: >-
      通过令牌交换以 Google、Apple、Microsoft 和 Facebook 实现无密码注册与登录。前端获取提供方凭证;API 验证后签发
      CBPay 会话。
  - name: 实时事件
    description: >-
      Server-Sent Events 流，实时推送账户内（管理员则为整个组织）发生的所有事件，支持通过 `Last-Event-ID`
      重放、可选的初始快照，以及 90 天可查询历史。
paths:
  /v1/qscore/reports:
    post:
      tags:
        - Qscore
      summary: 创建信用报告
      description: >-
        为主体（个人或企业）签发一份新的信用报告，在签发时按独立费用 （`risk_report_person` /
        `risk_report_company`）计费。幂等性是强制的： 使用相同的 `idempotency_key` 重试会返回原始报告并带
        `idempotency_hit: true`， 绝不重复收费。报告是同步计算的：响应通常是已完成的报告（status `ready`）
        或失败的报告（status `failed`，带 `error_code`/`error_message`）。 `purpose`
        字段为必填（数据保护法要求），`doc_id` 会按国家/地区验证并 规范化（例如带校验位的智利 RUT）。
      operationId: createQscoreReport
      requestBody:
        required: true
        content:
          application/json:
            examples:
              person:
                summary: 个人报告（智利 RUT）
                value:
                  doc_id: 12.345.678-5
                  country: CL
                  subject_type: person
                  purpose: credit_evaluation
                  lang: es
                  idempotency_key: qscore-9f2b8d11
              company:
                summary: 企业报告（智利企业 RUT）
                value:
                  doc_id: 76.543.210-3
                  country: CL
                  subject_type: company
                  purpose: supplier_onboarding
                  lang: en
                  idempotency_key: qscore-7a31c4e5
      responses:
        '201':
          description: >-
            报告已创建并完成计算。`model_version` 标识评分模型版本。状态为 `ready` 时嵌入完整的规范化 `report`
            对象；状态为 `failed` 时 `error_code`/`error_message` 说明原因，并释放幂等键以便重试。
          content:
            application/json:
              examples:
                ready:
                  summary: 报告就绪（评分已计算）
                  value:
                    report_id: 3f5c9f2d-7d21-4b8c-9a2d-2d5f6a1b8c01
                    subject_id: 8f5fb0d2-1d45-4a0e-9d5c-2d39f2b7a112
                    status: ready
                    purpose: credit_evaluation
                    lang: es
                    score: 742
                    band: B
                    model_version: v1
                    reason_codes:
                      - code: CREDIT_HISTORY_DEPTH
                        direction: positive
                        weight: medium
                      - code: ACTIVE_TRADELINES
                        direction: positive
                        weight: low
                    verify_code: Q3f5c9f2d7d214b8c9a2d2d5f6a1b8c01a1b2c3d4e5f60718293a
                    created_at: '2026-08-08T15:04:22Z'
                    completed_at: '2026-08-08T15:04:24Z'
                    report:
                      meta:
                        report_id: QSR-3F5C9F2D7D21
                        lang: es
                        purpose: credit_evaluation
                        generated_at: '2026-08-08T15:04:24Z'
                        verification_code: Q3f5c9f2d7d214b8c9a2d2d5f6a1b8c01a1b2c3d4e5f60718293a
                        verification_url: >-
                          /verify/qscore/Q3f5c9f2d7d214b8c9a2d2d5f6a1b8c01a1b2c3d4e5f60718293a
                      identity:
                        subject_type: person
                        doc_id: 12.345.678-5
                        name: Example Name
                        country: CL
                      score:
                        score: 742
                        band: B
                        model_version: v1
                        reason_codes:
                          - code: CREDIT_HISTORY_DEPTH
                            direction: positive
                            weight: medium
                          - code: ACTIVE_TRADELINES
                            direction: positive
                            weight: low
                        computed_at: '2026-08-08T15:04:24Z'
                      summary:
                        - No delinquencies or adverse events on record.
                        - Active credit history with reported tradelines.
                      tradelines:
                        - source: res_chile
                          creditor: Commercial creditor
                          kind: loan
                          status: current
                          currency: CLP
                          balance: '1250000'
                          opened_at: '2025-03-14'
                          reported_at: '2026-08-01'
                      delinquencies: []
                      sources:
                        - source: res_chile
                          label: Commercial bulletin
                          records: 1
                          fetched_at: '2026-08-08T15:04:23Z'
                ready_company:
                  summary: 含行业同业基准的企业报告
                  value:
                    report_id: 7c9a1f3d-2e44-4b8a-9d51-0a1b2c3d4e5f
                    subject_id: 5b7d0e2a-2c34-4f6a-8b11-7d8e9f0a1b2c
                    status: ready
                    purpose: credit_evaluation
                    lang: es
                    score: 712
                    band: B
                    model_version: qscore-v2
                    reason_codes:
                      - code: ACTIVE_TRADELINES
                        direction: positive
                        weight: medium
                    verify_code: Q7c9a1f3d2e444b8a9d510a1b2c3d4e5fa1b2c3d4e5f60718293a
                    created_at: '2026-08-08T14:52:03Z'
                    completed_at: '2026-08-08T14:52:05Z'
                    report:
                      meta:
                        report_id: QSR-7C9A1F3D2E44
                        lang: es
                        purpose: credit_evaluation
                        generated_at: '2026-08-08T14:52:05Z'
                        verification_code: Q7c9a1f3d2e444b8a9d510a1b2c3d4e5fa1b2c3d4e5f60718293a
                        verification_url: >-
                          /verify/qscore/Q7c9a1f3d2e444b8a9d510a1b2c3d4e5fa1b2c3d4e5f60718293a
                      identity:
                        subject_type: company
                        doc_id: 76.123.456-0
                        name: Example Company SpA
                        country: CL
                      score:
                        score: 712
                        band: B
                        model_version: qscore-v2
                        reason_codes:
                          - code: ACTIVE_TRADELINES
                            direction: positive
                            weight: medium
                        computed_at: '2026-08-08T14:52:05Z'
                      peer_benchmark:
                        available: true
                        segment_code: '6499'
                        segment_label: Other financial service activities
                        peers: 12
                        percentile: 75
                        median_score: 640
                      summary:
                        - No delinquencies or adverse events on record.
                        - Active credit history with reported tradelines.
                      tradelines:
                        - source: res_chile
                          creditor: Commercial creditor
                          kind: loan
                          status: current
                          currency: CLP
                          balance: '1250000'
                          opened_at: '2025-03-14'
                          reported_at: '2026-08-01'
                      delinquencies: []
                      sources:
                        - source: res_chile
                          label: Commercial bulletin
                          records: 1
                          fetched_at: '2026-08-08T14:52:04Z'
                no_data:
                  summary: 无信用局数据的主体（SC 等级）
                  value:
                    report_id: 9b2e7a41-3c10-4e7b-8f25-9d31a2b7c5e2
                    subject_id: 5c31a9d4-6b20-4f18-9a71-3e7b2d90c4aa
                    status: ready
                    purpose: hiring
                    lang: en
                    band: SC
                    model_version: v1
                    reason_codes:
                      - code: NO_DATA
                        direction: negative
                        weight: high
                    verify_code: Q9b2e7a413c104e7b8f259d31a2b7c5e2b2c3d4e5f60718293a4
                    created_at: '2026-08-08T15:10:02Z'
                    completed_at: '2026-08-08T15:10:03Z'
                replay:
                  summary: 幂等重放（200，带 idempotency_hit）
                  value:
                    report_id: 3f5c9f2d-7d21-4b8c-9a2d-2d5f6a1b8c01
                    subject_id: 8f5fb0d2-1d45-4a0e-9d5c-2d39f2b7a112
                    status: ready
                    purpose: credit_evaluation
                    lang: es
                    score: 742
                    band: B
                    model_version: v1
                    reason_codes:
                      - code: CREDIT_HISTORY_DEPTH
                        direction: positive
                        weight: medium
                    verify_code: Q3f5c9f2d7d214b8c9a2d2d5f6a1b8c01a1b2c3d4e5f60718293a
                    created_at: '2026-08-08T15:04:22Z'
                    completed_at: '2026-08-08T15:04:24Z'
                    idempotency_hit: true
        '400':
          description: >-
            invalid_payload | purpose_required | invalid_purpose |
            invalid_doc_id | invalid_subject_type | idempotency_key_required
          content:
            application/json:
              examples:
                purpose:
                  summary: 缺少 purpose
                  value:
                    error: purpose_required
                    message: purpose is required (data protection law)
                doc_id:
                  summary: 身份证件无效
                  value:
                    error: invalid_doc_id
                    message: doc_id is not valid for the given country
        '401':
          description: unauthorized
        '403':
          description: forbidden（服务已禁用或账户未验证）
        '404':
          description: not_found（未找到账户的父资源）
        '409':
          description: idempotency_conflict（相同键但 payload 不同，或仍在处理中）
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |
        会话 JWT(来自注册/登录)或 API key(`pk_...`)。
        也接受 `X-API-Key: <token>` 作为替代请求头。

````