> ## 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.

# 从 Banking 余额转出本地法币

> 发送一笔按走廊货币 1:1 结算的出金，扣减账户的本地法币余额（绝不扣 USDT）。仅支持以下走廊：`BO/BOB/bank_transfer`、`MX/MXN/bank_transfer`、`AR/ARS/bank_transfer` 和 `CL/CLP/fintoc` —— 其他一律返回 `422 banking_corridor_unsupported`。这是唯一可支出本地法币的路由（`POST /v1/payouts` 拒绝法币结算）；创建的资源就是 payout，可通过 `GET /v1/payouts(/:id)` 查询，具有相同的生命周期、webhook 和回单。

需要幂等键（body 字段或 `Idempotency-Key` 请求头）。使用相同键重试会返回原始 payout（`200` 附 `idempotency_hit: true`）。若合规筛查暂时不可用，返回 `202`，payout 为 `status: pending`、`status_code: compliance_pending`、`compliance_pending: true` 且 `funds_debited: false`，尚未扣款；请保留相同的键等待对账。计价时优先使用该走廊已配置的 `purpose: banking` 的 `payout` 费率，否则回退到通用 `payout` 费率——Banking 转账可拥有独立于全局 payout 的费率。



## OpenAPI

````yaml /openapi.zh.yaml post /v1/banking/fiat-transfers
openapi: 3.1.0
info:
  title: CBPay API
  version: '2.338'
  description: >
    CBPay 是一个多币种支付平台:覆盖拉美的法币付款(payout)与收款(payin)、内部转账、链上充值与提现,以及 KYC
    筛查。每个账户持有十二个相互独立的虚拟余额——USD(主资产,可随时更改默认值)、USDT、USDC、USDCE、BTC、
    GOLD(纯金克数)、SILVER(纯银克数)、PLATINUM(纯铂金克数)和 BOB、MXN、ARS、CLP(法币账本; BOB/MXN/ARS 为
    2 位小数, CLP 为 0 位)——其中七个可兑换资产可通过兑换(swap)按需转换。法币余额(BOB/MXN/ARS/CLP)仅累积带
    `fiat_hold_local` 标记的留存 payin 与同币种直接扣款;不可 swap。

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

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

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


    所有金额均为十进制字符串,遵循各货币的精度(USD/BOB/MXN/ARS 为 2 位小数,CLP 为 0
    位,USDT/USDC/USDCE/GOLD/SILVER/PLATINUM 为 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: Support
    description: 支持工单和组织队列
  - name: 凭证
    description: >-
      每笔操作的品牌化 PDF 凭证,附带公开的签名 QR 真伪校验、最终状态响应/webhook 中的 receipt_url,
      以及最终状态时的自动邮件发送。扣款前处于 pending 的 payout 不会暴露 receipt_url。
  - name: 身份认证
    description: 注册与登录账户成员。会话有效期 24 小时。
  - name: 账户
    description: 调用账户的档案、成员与 API key。
  - name: 余额
    description: 余额、流水历史与外汇汇率。
  - name: 付款(Payouts)
    description: 从你选择的结算余额扣款的法币派发(USD 为主资产)。
  - name: 收款(Payins)
    description: 法币充值(二维码、转账、专属账户、pull 收款、卡片、checkout 链接)自动入账——以 USD 入账,也可自动兑换为你选择的结算资产。
  - 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: 按账户报价即时兑换账户的 USD（默认）、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/CFT 筛查
    description: 针对个人与企业的独立 AML/CFT 筛查(制裁、PEP 与负面媒体名单),含重新筛查、持续监控与可下载的 PDF 报告。
  - name: 钱包筛查
    description: 区块链地址的 AML/CFT 风险评估(制裁、非法资金暴露),按次收费;另附提现与充值的免费自动防护。
  - name: Qscore
    description: >-
      API 优先的信用局。签发完整的信用报告，评分为 1-999（A-E 等级，无数据时为 SC），查询主体的最新评分，并管理 ARCO
      争议。智利先行，设计上与国家无关。每份签发的报告都带有公开验证码。
  - name: 分析
  - name: Webhooks
    description: 接收签名事件通知的订阅。
  - name: 状态
    description: 服务可用性。
  - name: 银行服务
    description: 真实银行账户:通过国际银行通道接收、持有与发送资金。
  - name: 卡片
    description: >-
      以 Just-In-Time 方式从七种消费资产(USD、USDT、USDC、BTC、GOLD、SILVER 或
      PLATINUM)中任选其一消费的虚拟卡与实体卡,支持按卡设置消费限额。
  - 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 天可查询历史。
  - name: 合同
    description: 面向已验证企业账户的预填充 Grupo CB 主协议。
  - name: 推荐人门户
    description: 推荐人只读门户（payout 账户凭证）：个人资料、已推荐客户、已计提佣金和三语对账单（JSON/PDF/XLSX）。
paths:
  /v1/banking/fiat-transfers:
    post:
      tags:
        - Banking
      summary: 从 Banking 余额转出本地法币
      description: >-
        发送一笔按走廊货币 1:1 结算的出金，扣减账户的本地法币余额（绝不扣
        USDT）。仅支持以下走廊：`BO/BOB/bank_transfer`、`MX/MXN/bank_transfer`、`AR/ARS/bank_transfer`
        和 `CL/CLP/fintoc` —— 其他一律返回 `422
        banking_corridor_unsupported`。这是唯一可支出本地法币的路由（`POST /v1/payouts`
        拒绝法币结算）；创建的资源就是 payout，可通过 `GET /v1/payouts(/:id)` 查询，具有相同的生命周期、webhook
        和回单。


        需要幂等键（body 字段或 `Idempotency-Key` 请求头）。使用相同键重试会返回原始 payout（`200` 附
        `idempotency_hit: true`）。若合规筛查暂时不可用，返回 `202`，payout 为 `status:
        pending`、`status_code: compliance_pending`、`compliance_pending: true` 且
        `funds_debited: false`，尚未扣款；请保留相同的键等待对账。计价时优先使用该走廊已配置的 `purpose:
        banking` 的 `payout` 费率，否则回退到通用 `payout` 费率——Banking 转账可拥有独立于全局 payout
        的费率。
      operationId: createBankingFiatTransfer
      parameters:
        - $ref: '#/components/parameters/idempotencyKeyHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - country
                - currency
                - method
                - amount
              properties:
                country:
                  type: string
                  description: Banking 法币国家 ISO 3166-1 alpha-2：BO、MX、AR 或 CL。
                currency:
                  type: string
                  description: 对应本地货币：BOB、MXN、ARS 或 CLP。
                method:
                  type: string
                  description: Banking 法币方式：`bank_transfer`（BO/MX/AR）或 `fintoc`（仅 CL）。
                amount:
                  type: string
                  description: 本地货币金额，正数小数字符串（CLP 没有辅币：仅限整数）。
                  example: '2000'
                beneficiary:
                  type: object
                  additionalProperties:
                    type: string
                  description: >-
                    收款账户信息。必填字段取决于走廊；见 `GET
                    /v1/payouts/beneficiary-schema`。智利：`name` + `tax_id`（有效
                    RUT）+ `bank_code` + `account_type` + `account_number`。
                beneficiary_contact_id:
                  type: string
                  format: uuid
                  description: >-
                    使用该联系人在此国家的最近一次收款信息，代替填写 `beneficiary`。显式 `beneficiary`
                    优先；联系人无记录时返回 422 no_saved_destination。
                save_contact:
                  type: boolean
                  default: true
                  description: 收款人默认自动存为联系人；传 false 可跳过。
                description:
                  type: string
                  description: 可选付款附言。
                settlement_asset:
                  type: string
                  enum:
                    - BOB
                    - MXN
                    - ARS
                    - CLP
                  description: 必须省略或与走廊货币一致（identity 结算自动生效）。其他值返回 400。
                source_instrument_id:
                  type: string
                  format: uuid
                  description: >-
                    BO/BOB banking 来源选择器（多 Banking 账户下的“当前操作”账户）。仅限
                    BO/BOB，其他走廊会被拒绝。
                idempotency_key:
                  type: string
                options:
                  type: object
                  description: 可选通道参数。在智利银行近期拒付后刻意重试时，将 destination_retry_ack 设为最近的先前案例 ID。
                  additionalProperties:
                    type: string
            examples:
              cl_fintoc:
                summary: 智利 — 经 Fintoc 银行转账（CLP）
                value:
                  country: CL
                  currency: CLP
                  method: fintoc
                  amount: '2000'
                  beneficiary:
                    name: Nicolas Merino
                    tax_id: 17.629.916-9
                    bank_code: '016'
                    account_type: checking
                    account_number: '72815742'
                  settlement_asset: CLP
                  idempotency_key: fiat-cl-0001
              bo_bank_transfer:
                summary: 玻利维亚 — ACH 转账（BOB）
                value:
                  country: BO
                  currency: BOB
                  method: bank_transfer
                  amount: '500.00'
                  beneficiary:
                    name: Ana Morales
                    tax_id: '1234567'
                    bank_code: '001'
                    account_number: '123456789'
                  idempotency_key: fiat-bo-0001
      responses:
        '200':
          description: 已有转账的幂等重放....
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payout'
              example:
                payout_id: 7d5c2f0a-1e9b-4a6d-8f3c-0b2a1d9e8c7f
                account_id: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d
                idempotency_key: fiat-cl-0001
                country: CL
                currency: CLP
                method: fintoc
                local_amount: '2000'
                fx_rate: '950.00'
                usdt_amount: '2.105263'
                fee: '0.010000'
                total_debit: '2.115263'
                settlement_asset: CLP
                settlement_amount: '2009'
                settlement_rate: '1'
                beneficiary:
                  name: Nicolas Merino
                  tax_id: 17.629.916-9
                  bank_code: '016'
                  account_type: checking
                  account_number: '72815742'
                description: ''
                status: completed
                status_code: ''
                status_message: ''
                bank_reference: tr_01J9ZQK6F7
                created_at: '2026-11-26T12:00:00Z'
                updated_at: '2026-11-26T12:01:00Z'
                idempotency_hit: true
        '202':
          description: >-
            已受理进入合规筛查（`compliance_pending`，尚未扣款）或已创建处理中。与 `POST /v1/payouts` 相同的
            Payout 结构。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payout'
              example:
                payout_id: 8e6d3f1b-2f0c-5b7e-90ad-1c3b2e0f9d80
                account_id: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d
                idempotency_key: fiat-bo-0001
                country: BO
                currency: BOB
                method: bank_transfer
                local_amount: '500.00'
                fx_rate: '6.96'
                usdt_amount: '71.839080'
                fee: '0.300000'
                total_debit: '72.139080'
                settlement_asset: BOB
                settlement_amount: '502.09'
                settlement_rate: '1'
                beneficiary:
                  name: Ana Morales
                  tax_id: '1234567'
                  bank_code: '001'
                  account_number: '123456789'
                description: ''
                status: processing
                status_code: ''
                status_message: ''
                bank_reference: ''
                created_at: '2026-11-26T12:00:00Z'
                updated_at: '2026-11-26T12:00:00Z'
        '400':
          description: >-
            非法请求（`idempotency_key_required`、`beneficiary_required`、`invalid_beneficiary`、`invalid_amount`、`invalid_settlement_asset`，或方法为空/`source_instrument_id`
            位置错误时的 `invalid_request`）。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                invalid_settlement_asset:
                  summary: 超出走廊货币的结算
                  value:
                    error: invalid_settlement_asset
                    message: banking transfers always settle in the corridor currency
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/InsufficientFunds'
        '403':
          description: 账户未激活（`account_blocked`）、缺少账户凭证，或设备证明过期（`integrity_required`）。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                account_blocked:
                  value:
                    error: account_blocked
                    message: account is not active
        '409':
          description: >-
            走廊被管理员禁用（`corridor_disabled`，由统一 payout 开关控制）或同一键被用于不同
            payload（`idempotency_conflict`）。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                corridor_disabled:
                  value:
                    error: corridor_disabled
                    message: this payout corridor is currently unavailable
        '422':
          description: >-
            走廊不在目录内（`banking_corridor_unsupported`）、金额上下限（`amount_below_minimum`、`amount_above_maximum`），或通道前置拒绝（响应为
            `status: failed` 的 payout 对象，扣款已退还）。
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/Error'
                  - $ref: '#/components/schemas/Payout'
              examples:
                banking_corridor_unsupported:
                  summary: 非 Banking 法币走廊
                  value:
                    error: banking_corridor_unsupported
                    message: >-
                      banking fiat transfers are only supported for BO/BOB,
                      MX/MXN and AR/ARS bank_transfer and CL/CLP/fintoc
          x-money-out-errors:
            - amount_below_minimum
            - amount_above_maximum
            - velocity_limit_exceeded
        '503':
          description: 出金通道暂时不可用（`channel_unavailable`）；请稍后使用相同幂等键重试。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: channel_unavailable
                message: >-
                  the payout channel is temporarily unavailable, please retry
                  later
components:
  parameters:
    idempotencyKeyHeader:
      name: Idempotency-Key
      in: header
      required: false
      description: '`idempotency_key` 请求体字段的替代方式。'
      schema:
        type: string
  schemas:
    Payout:
      type: object
      properties:
        payout_id:
          type: string
          format: uuid
        account_id:
          type: string
          format: uuid
        idempotency_key:
          type: string
        country:
          type: string
        currency:
          type: string
        method:
          type: string
        local_amount:
          type: string
        fx_rate:
          type: string
          description: 执行时你账户的汇率(每 1 USDT 的本地单位数)。
        rate_source:
          type: string
          enum:
            - lot
            - blend
            - spot
          description: 执行汇率来源。`lot`、`blend` 或 `spot`；没有归因的历史记录会省略。
        usdt_amount:
          type: string
        fee:
          type: string
        total_debit:
          type: string
        settlement_asset:
          type: string
          enum:
            - USD
            - USDT
            - USDC
            - BTC
            - GOLD
            - SILVER
            - PLATINUM
          description: 该操作实际扣款的虚拟余额。
        settlement_amount:
          type: string
          description: >-
            从结算资产余额实际扣除的准确金额(以该资产单位表示)。当资产为 USDT 时等于 `total_debit`。若 payout
            失败,退款即为该准确金额——绝不重新计价。
        settlement_rate:
          type: string
          description: 用于转换 USDT 总额的结算资产有效 USD 单价(USD/USDT/USDC 为 "1")。
        beneficiary:
          type: object
        description:
          type: string
        status:
          type: string
          enum:
            - pending
            - processing
            - completed
            - failed
          description: >-
            `pending` 且 `compliance_pending: true` 表示收款人技术筛查在任何扣款或调用 core
            之前等待。筛查通过后，`pending` 也可使用
            `compliance_dispatch_pending`、`compliance_dispatching` 或
            `core_unreachable`，此时扣款仍被持有。
        status_code:
          type: string
          description: >-
            规范化状态详情。`compliance_pending`
            表示扣款前状态；`compliance_dispatch_pending`、`compliance_dispatching` 和
            `core_unreachable` 表示筛查后的持久化转换。
        status_message:
          type: string
        funds_debited:
          type: boolean
          description: 技术筛查 pending 且尚未扣款时为 false。筛查通过并存在扣款/hold 后为 true，包括派发转换期间。
        predebit_failure:
          type: boolean
          description: 筛查或硬性合规控制在任何扣款前终止 payout 时为 true；不同于扣款后再退款的失败 payout。
        compliance_pending:
          type: boolean
          description: 仅当技术筛查在任何扣款或调用 core 之前等待时为 true；接受 process 结果后为 false。
        bank_reference:
          type: string
          description: >-
            银行/支付渠道的交易参考号(受益人可用它与银行核对付款)。US ACH/wire/SWIFT 在创建时立即返回 CBF
            参考号；其他通道在渠道报告之前为空。
        uetr:
          type: string
          description: 银行在执行后报告的 UETR/SWIFT gpi tracking 标识；可用前为空。
        imad:
          type: string
          description: 银行在执行后报告的国内 wire/ACH tracking 标识；可用前为空。
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        idempotency_hit:
          type: boolean
          description: 当响应为幂等重放时为 true。
        receipt_url:
          type: string
          format: uri
          description: 仅在存在凭证时返回，通常在扣款并进入最终状态后出现。payout 在扣款前等待技术筛查时省略。
    Error:
      type: object
      properties:
        error:
          type: string
          description: 机器可读的错误代码(snake_case)。
          example: insufficient_funds
        message:
          type: string
          description: 人类可读的说明。
        details:
          type: object
          description: >-
            可选的机器可读上下文。insufficient_funds 仅在数值精确时返回相应字段；USD 等价字段只适用于 USD、USDT 和
            USDC。
          additionalProperties: true
  responses:
    Unauthorized:
      description: 凭证缺失或无效(`unauthorized`)。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: unauthorized
            message: invalid or missing credentials
    InsufficientFunds:
      description: 账户余额不足以完成此操作(`insufficient_funds`)。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: insufficient_funds
            message: account balance is not enough for this operation
            details:
              asset: USDT
              need: '103.930000'
              available: '80.000000'
              missing: '23.930000'
              need_amount: '100.000000'
              need_fee: '3.930000'
              need_usd: '103.930000'
              available_usd: '80.000000'
              missing_usd: '23.930000'
              need_amount_usd: '100.000000'
              need_fee_usd: '3.930000'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |
        会话 JWT(来自注册/登录)或 API key(`pk_...`)。
        也接受 `X-API-Key: <token>` 作为替代请求头。

````

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