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

# 创建交易 API：KYT 交易提交

> 向 Didit KYT 提交交易，进行风险评分、筛查和 Travel Rule 处理。每月包含 1,000 笔交易，之后每笔 $0.001。



创建交易 API 提示词
        将提示词复制到剪贴板



      
      

\<pre>

\`Submit a transaction for Didit monitoring through the Management API.

Endpoint:
POST https://verification.didit.me/v3/transactions/

Authentication:
Use the x-api-key header with my Didit API key.

Goal:
\- Submit a transaction for KYT (transaction monitoring). Didit runs the configured rules engine, blockchain analytics, and AML screening synchronously and returns the verdict in the response. The full detail (parties, rule runs, provider results, remediation links) is also returned.
\- A Travel Rule transfer is stored in the same call, but Didit contacts the counterparty after the response: travel_rule.status comes back AWAITING_COUNTERPARTY (or NOT_APPLICABLE, UNCONFIRMED_OWNERSHIP, or COMPLETED for your own verified wallet) with travel_rule.protocol null, and every later status change, including COUNTERPARTY_VASP_NOT_FOUND, arrives as a travel_rule.status.updated webhook. Your rules run again when the rail or the status changes.

When to call:
\- At payment authorization, before fanning out funds, to decide allow / hold / decline based on status, score, severity.
\- On post-trade events (gambling bets, audit-trail events, KYC events) for long-running monitoring without a per-transaction decision.
\- On crypto deposits / withdrawals — set transaction_details.currency_kind = "crypto" and provide the relevant wallet address in payment_method.account_id.
\- For Travel Rule, set transaction_category = "travel_rule" and include travel_rule_details (alias travelRule).
travel_rule_details.status is required (400 if missing); when Travel Rule is enabled, Didit runs the exchange and ignores the status you send, and otherwise Didit records the transfer passively with that status.
When the subject is a user with an approved Didit KYC verification and Travel Rule is on, Didit replaces the originator_data fields the verification holds with the verified values (metadata.originator_provenance says which); otherwise it sends originator_data as you provide it, so build it from the identity you verified.
beneficiary_data carries the beneficiary (name, wallet_address, chain) and any routing hints (travel_address, counterparty_vasp_lei, counterparty_vasp_name, counterparty_vasp_email).
If beneficiary_data.chain is empty, Didit takes transaction_details.crypto_params.crypto_chain, else custom_properties.crypto_chain, else the currency, uppercases it, and sets it only when it is a chain Didit recognises (for example ETH or BTC).
\- Chain shapes: on XRP, XLM, EOS, ATOM and HBAR send the destination tag or memo as payment_method.memo (or beneficiary_data.memo); on BTC, LTC, BCH and DOGE send the transaction's inputs and outputs as travel_rule_details.utxo; on bitcoin or Lightning, payment_method.account_id may be a Lightning payment request or Lightning Address. What Didit resolved is on travel_rule.chain_details (see /transaction-monitoring/travel-rule#chain-shapes).

Identifiers:
\- transaction_id (alias txnId) is YOUR identifier (max 128 chars), unique per application.
It becomes txn_id on subsequent calls.
Reusing a transaction_id that already exists returns 400 {"transaction_id": ["A transaction with this transaction_id already exists."]}, and when two identical requests race each other the loser gets 409.
Neither response returns the existing transaction, so to retry safely, treat a 400 or 409 for a duplicate id as already created and look the transaction up instead of resubmitting: GET /v3/transactions/{uuid}/ with the Didit uuid from the first response, or with the transaction_id (the Didit uuid) that the transaction.created webhook carries next to your txn_id.
GET does not accept your txn_id. Sandbox applications do not receive transaction.created or transaction.status.updated, so save the Didit uuid from the create response. Sandbox Travel Rule exchanges do emit travel_rule.status.updated with environment: sandbox.
\- The returned uuid is Didit's stable identifier — use it in GET /v3/transactions/{transaction_id}/.

Linking to entities:
\- subject.vendor_data (and optionally counterparty.vendor_data) are your internal user/business identifiers. They link the transaction to the long-lived User / Business entity assembled from prior verification sessions. Use the SAME vendor_data you supplied when creating the KYC session.

Minimum request body (application/json):
\{
"transaction_id": "your-txn-2026-05-17-001",
"transaction_category": "finance",   // finance | kyc | travel_rule | user_event | audit_trail_event | gambling_bet | gambling_limit_change | gambling_bonus_change
"transaction_details": {
"direction": "outbound",            // "inbound" | "outbound"
"amount": 1500,                     // number or decimal string, up to 18 decimal places (string for exact precision); never negative, because direction carries the sign
"currency": "EUR",                  // any ISO 4217 code (EUR, USD, NGN, ...) or a crypto symbol
"currency_kind": "fiat",            // "fiat" | "crypto" (optional)
"action_type": "withdrawal"         // optional, e.g. deposit/withdrawal/transfer
},
"subject": {                          // APPLICANT party
"entity_type": "individual",        // "individual" | "company"
"vendor_data": "user-12345",        // required
"full_name": "Maria Garcia",        // required
"address": { "country": "ESP" }     // optional
},
"counterparty": { ... },              // optional COUNTERPARTY party (same shape as subject)
"transaction_at": "2026-05-17T08:42:00Z",  // optional, defaults to now
"travel_rule_details": { "status": "AWAITING_COUNTERPARTY", ... }   // optional, for crypto Travel Rule; status is required inside it
}

Currency codes:
\- currency has no enum. Any ISO 4217 alphabetic code (EUR, USD, NGN, ...) and any crypto asset symbol (BTC, ETH, ...) are accepted and stored exactly as you send them, up to 10 characters.
\- Prefer a currently-circulating code. Not every accepted code has an exchange rate: withdrawn currencies and accounting units such as XDR are often still quoted, but when Didit has no rate for the code you send (for example the ISO accounting unit XSU, or a crypto symbol Didit does not price), automatic conversion to your base currency fails and preferred_currency_amount comes back null. A pre-converted amount_in_default_currency is always used as sent when present, so supply it for any code you are not sure has a rate.
\- Set currency_kind = "crypto" for on-chain amounts. The kind gates the transaction's own crypto AML screening: without currency_kind = "crypto" that regular screening step is skipped and no screening fee is estimated or charged for it, even with monitoring enabled or include_crypto_screening = true. Travel Rule attribution is a separate path: on a production application with Travel Rule and VASP attribution enabled, an outbound transaction_category = "travel_rule" request whose beneficiary wallet and chain cannot be reached over any rail triggers a VASP attribution wallet screening, and that screening is billed at the wallet screening price whatever currency_kind is or is not set. The kind does not change the stored decimal scale: up to 18 decimal places are kept either way, but only when amount arrives as a decimal string ("0.123456789012345678"). A JSON number is parsed as a binary float first, so anything beyond about 15 significant digits is rounded before it is stored (0.123456789012345678 is stored as 0.12345678901234568). The kind also decides how the amount is rendered in the transaction PDF. Crypto amounts render with up to 8 decimal places, fiat amounts with their ISO 4217 minor unit (2 for most currencies). Without the kind, RON, MNT and GEL are rendered as fiat because each is both a token and an ISO 4217 currency, so a small token amount can show as 0 in the report.
The VASP attribution screening is skipped when the transaction's own crypto screening already screened that wallet: Didit reuses that result and charges nothing extra.

Example call:
curl -X POST "https://verification.didit.me/v3/transactions/" \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{
"transaction_id": "your-txn-2026-05-17-001",
"transaction_category": "finance",
"transaction_details": {"direction":"outbound","amount":1500,"currency":"EUR","action_type":"withdrawal"},
"subject": {"entity_type":"individual","vendor_data":"user-12345","full_name":"Maria Garcia"}
}'

What to read from the response:
\- uuid — Didit transaction id, use for GET /v3/transactions/{transaction_id}/.
\- status - APPROVED | IN_REVIEW | DECLINED | AWAITING_USER (live verdict; at creation, AWAITING_USER comes from a rule action).
\- score (0–100, higher = riskier) and severity (LOW | MEDIUM | HIGH | CRITICAL).
\- decision_reason_code / decision_reason_label — machine + human verdict reason.
\- parties (role APPLICANT for the subject, COUNTERPARTY for the counterparty; kind USER, BUSINESS or EXTERNAL), cost_breakdown, rule_runs, provider_results (crypto screening results) and network_snapshot.
\- travel_rule - the Travel Rule transfer (status, protocol, required, originator_data, beneficiary_data, direction, rail, counterparty_vasp, delivery, discovery, reason, next_actions), or null; action_required - a pending wallet-ownership or verification step, or null.
reason and next_actions say why a COUNTERPARTY_VASP_NOT_FOUND or COUNTERPARTY_VASP_NOT_REACHABLE transfer is stuck and what moves it on (for example email_undeliverable: update_compliance_email, then resend); they are "" and [] for any other status.

Webhooks:
\- transaction.created fires after this call succeeds.
\- For a travel_rule transaction, travel_rule.status.updated fires for each Travel Rule transition, after transaction.created. Each webhook is delivered and retried on its own, so key on transaction_id rather than on arrival order.
\- transaction.status.updated fires whenever the verdict changes (manual review, async screening, rule re-runs). Subscribe a destination via POST /v3/webhook/destinations/.

Failure modes:
\- 400 - duplicate transaction_id, missing required field (including travel_rule_details.status), an unknown travel_rule_details.status ("Invalid travel rule status: ..."), invalid direction/category enum, or malformed party object.
\- 409 - a concurrent request with the same transaction_id was created first.
\- 403 - missing x-api-key (a wrong, revoked or expired key gets 401), or a key without permission for this action; the body is a { "detail": "..." } envelope.
\- 403 - the organization's balance cannot cover the fees this request would charge: { "detail": "...", "code": "insufficient_credits" }, and nothing is created.
\- 429 - more than 600 ingestion requests per minute for this API key (transaction and event ingestion share this budget, apart from the 300 of every other write); wait Retry-After seconds and retry.

Side effects:
\- Creates the transaction record and runs the synchronous rules + screening pipeline.
\- Links the transaction to the User / Business entity that shares the subject.vendor_data.
\- An outbound travel_rule transaction is billed once, at creation, on one line. It pays the Travel Rule fee ($0.02) when Travel Rule is on and Didit starts an exchange for it (amount at or above threshold_amount, including a transfer to a self-hosted wallet or to the user's own verified wallet). Otherwise it is billed as transaction monitoring (included in the plan's monthly transaction allowance, $0.001 each beyond it): below threshold_amount, a Lightning payment the Travel Rule does not apply to, or data recorded while Travel Rule is disabled. A resend never charges again.
\- An inbound travel_rule transaction pays no base fee, an application that joined Travel Rule free pays none on outbound transactions until it turns outbound billing on, and sandbox applications are never charged.
\- Crypto screening, when it runs, adds the Wallet Verification & Screening charge.

For the full integration shape, see /integration/integration-prompt.`

\</pre>



      
      

粘贴到



## OpenAPI

````yaml zh/openapi-25.json POST /v3/transactions/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: 身份证件验证 API。使用 x-api-key 请求头进行身份验证。
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/transactions/:
    post:
      tags:
        - Transactions
      summary: 创建交易
      description: >-
        提交交易以进行同步 AML/风险监控。交易创建时的状态为
        `APPROVED`，随后您的规则（以及适用的加密货币筛查）以内联方式运行，并可能将返回的 `status` 更改为 `IN_REVIEW` 或
        `DECLINED`。**`transaction_id` 是您的幂等性密钥**（最多 128 个字符，每个应用唯一）；重复使用将返回
        400。生产环境应用在成功时会派发 `transaction.created` Webhook。沙盒应用不计费，且不会发出
        `transaction.created` 或 `transaction.status.updated` Webhook。沙盒 Travel
        Rule 交换确实会发出带有 `environment: sandbox` 的 `travel_rule.status.updated`
        Webhook。在联系任何交易对手之前，Travel Rule 转账即已存储并返回：`travel_rule.status` 返回为
        `AWAITING_COUNTERPARTY`（低于阈值时为 `NOT_APPLICABLE`，声明的自托管钱包为
        `UNCONFIRMED_OWNERSHIP`，当对方钱包是您自己的已验证钱包时为 `COMPLETED`），且
        `travel_rule.protocol` 为 null。随后 Didit
        选择通道并发送交换信息，转账后续的每一次状态变更（包括没有通道能触达交易对手时的
        `COUNTERPARTY_VASP_NOT_FOUND`）都会以 `travel_rule.status.updated` Webhook
        形式送达。当通道或状态发生变化时，您的规则会再次运行。
      operationId: createTransaction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                transaction_id:
                  type: string
                  description: 您对此交易的唯一标识符（最多 128 个字符）。
                  example: your-txn-2026-05-17-001
                transaction_at:
                  type: string
                  format: date-time
                  description: 交易发生的时间。如果省略，则默认为当前时间。
                time_zone:
                  type: string
                  description: IANA 时区标识符，例如 `Europe/Madrid`。
                transaction_category:
                  type: string
                  description: >-
                    交易类别。也接受驼峰命名别名（`travelRule`、`userPlatformEvent`、`gamblingBet`
                    等）；对于多词类别，存储/回显的值为 camelCase。
                  example: finance
                  enum:
                    - finance
                    - kyc
                    - travel_rule
                    - user_event
                    - audit_trail_event
                    - gambling_bet
                    - gambling_limit_change
                    - gambling_bonus_change
                    - travelRule
                transaction_details:
                  type: object
                  description: 交易的核心财务详情。
                  required:
                    - direction
                    - amount
                    - currency
                  properties:
                    direction:
                      type: string
                      description: >-
                        相对于主体的交易方向。不区分大小写；接受 `in`/`out`
                        作为别名。以大写形式返回（`INBOUND`/`OUTBOUND`）。
                      example: outbound
                      enum:
                        - inbound
                        - outbound
                        - in
                        - out
                    amount:
                      type: number
                      description: >-
                        交易金额（最多 18 位小数）。如果需要精确度，请将其作为十进制字符串发送（例如
                        `"0.123456789012345678"`）：JSON
                        数字会先解析为二进制浮点数，因此在存储金额之前，超过约 15
                        位有效数字的位数会被四舍五入。必须为零或更大：方向包含符号，负金额将返回 `400`。
                      example: 1500
                    currency:
                      type: string
                      description: >-
                        货币代码。接受任何 ISO 4217 字母代码（例如 `EUR`、`USD`、`NGN`）以及加密资产符号（例如
                        `BTC`）。建议使用当前流通的代码。并非每个接受的代码都有汇率：当该代码没有可用汇率时（例如 ISO 会计单位
                        `XSU`，或 Didit 未定价的加密资产符号），自动换算将失败，并且
                        `preferred_currency_amount` 将返回 null，除非请求提供了预先换算的
                        `amount_in_default_currency`。
                      example: EUR
                    currency_kind:
                      type: string
                      description: 币种是 `fiat` 还是 `crypto`。
                    amount_in_default_currency:
                      type: number
                      nullable: true
                      description: 以默认币种计的预先换算金额。若省略，将尝试自动进行外汇换算。必须为零或更大值。
                    default_currency:
                      type: string
                      description: 转换金额的默认货币代码。任何当前流通的 ISO 4217 代码。
                    payment_details:
                      type: string
                      nullable: true
                      description: 自由文本付款参考号或附言。
                    payment_reference_id:
                      type: string
                      nullable: true
                      description: >-
                        外部支付系统参考标识。对于加密货币 AML 交易哈希筛查，请发送区块链交易哈希，并在
                        `subject.payment_method.account_id` 中提供相关地址。
                    action_type:
                      type: string
                      nullable: true
                      description: 交易的子类型，例如 `deposit`、`withdrawal`、`transfer`。
                    crypto_params:
                      type: object
                      description: 加密网络选择，独立于货币（资产符号）。记录自定义 token 符号并不能保证其合约的交易哈希覆盖率。
                      properties:
                        crypto_chain:
                          type: string
                          description: >-
                            用于筛查的实际网络。托管筛查支持
                            BTC、ETH、LTC、XRP、BCH、DOGE、TRX、SOL、MATIC、BNB、BASE
                            (Base)、OP (Optimism)、ARB (Arbitrum One)、AVAX
                            (Avalanche C-Chain)、ADA (Cardano)、XLM (Stellar) 以及
                            HBAR (Hedera)。也接受常见网络名称，例如针对 MATIC 的 POLYGON 或
                            POL、针对 BNB 的 BSC 以及针对 TRX 的 TRON。对于多网络代币，请务必指定此项。当带有
                            0x 交易哈希的 USDT、USDC 或 ETH 缺失此项时，Didit 会在 Ethereum、BNB
                            Chain、Polygon、Base、Arbitrum 和 Optimism
                            上查找该哈希，并在找到它的网络上进行筛查；如果所有网络均未找到，则不对该交易进行筛查，custom_values.aml_screening_status
                            为 FAILED，原因记录在 custom_values.aml_screening_error
                            中。当通过钱包筛查（无交易哈希）的 USDT 或 USDC 缺失此项时，Tron 地址在 Tron
                            上筛查，Solana 地址在 Solana 上筛查，0x
                            地址则在上述六个网络中首个发送过交易或持有该代币的网络上筛查，若在所有这些网络上均不活跃，则在
                            Ethereum 上筛查。已连接提供商的覆盖范围各不相同；LIGHTNING 需要受支持的已连接提供商。
                          example: BASE
                subject:
                  type: object
                  description: 交易的主体（申请人）。
                  required:
                    - vendor_data
                    - full_name
                  properties:
                    entity_type:
                      type: string
                      description: 主体类型：`individual` 或 `company`。
                    vendor_data:
                      type: string
                      description: 您的内部用户/企业标识符。
                      example: user-12345
                    full_name:
                      type: string
                      description: 主体的姓名。
                      example: Maria Garcia
                    first_name:
                      type: string
                      description: 主体的名。
                    last_name:
                      type: string
                      description: 主体的姓氏。
                    date_of_birth:
                      type: string
                      format: date
                      description: 出生日期（YYYY-MM-DD）。
                    address:
                      type: object
                      description: 地址对象。
                      properties:
                        country:
                          type: string
                          description: >-
                            国家/地区代码（推荐使用 ISO 3166-1 alpha-3）。复制到该主体的
                            `country_code`。
                        town:
                          type: string
                        state:
                          type: string
                        street:
                          type: string
                        post_code:
                          type: string
                    institution_details:
                      type: object
                      description: 机构详情（针对机构主体）。
                      properties:
                        name:
                          type: string
                        code:
                          type: string
                        address:
                          type: object
                    device_context:
                      type: object
                      description: >-
                        在交易时采集的设备上下文。browser_family 和 platform
                        必须作为明确的顶级键发送，它们不是从 user_agent 派生的。请求上也接受驼峰命名别名 device。
                      properties:
                        fingerprint:
                          type: string
                          description: 唯一设备指纹。
                        persistent_device_id:
                          type: string
                          description: 跨会话的稳定设备标识符（v2 指纹架构）。
                        user_agent:
                          type: string
                          description: 浏览器或应用的 user agent 字符串。驼峰式命名别名：userAgent。
                        browser_family:
                          type: string
                          description: >-
                            浏览器家族（例如 Chrome、Firefox、Safari）。必须显式发送 — 它不会从
                            user_agent 推导。驼峰式命名别名：browserFamily。
                        browser_version:
                          type: string
                          description: 浏览器版本字符串。必须显式发送。驼峰式命名别名：browserVersion。
                        platform:
                          type: string
                          description: >-
                            平台标识符（web、ios、android、macos、windows、linux）。必须显式发送 —
                            不会从 user_agent 推断得出。
                        os_family:
                          type: string
                          description: 操作系统系列（例如 iOS、Android、Windows）。驼峰命名别名：osFamily。
                        os_version:
                          type: string
                          description: 操作系统版本字符串。驼峰命名别名：osVersion。
                        accept_language:
                          type: string
                          description: Accept-Language 请求头的值。CamelCase 别名：acceptLang。
                        session_id:
                          type: string
                          description: 用户当前会话的会话标识符。存储在元数据中。CamelCase 别名：sessionId。
                        session_age_ms:
                          type: number
                          description: 交易发生时用户会话的时长（毫秒）。驼峰式别名：sessionAgeMs。
                        network_context:
                          type: object
                          description: 包含 IP 地址和地理位置的网络上下文。顶层 ipInfo 块也会合并到此对象中。
                          properties:
                            ip_address:
                              type: string
                              description: 客户端 IP 地址。驼峰命名别名：ip。
                            ip_country_code:
                              type: string
                              description: >-
                                基于地理位置解析的 IP 所在国家/地区（ISO 3166-1
                                alpha-3）。驼峰命名别名：countryCode3。
                            latitude:
                              type: number
                              description: 该 IP 的地理纬度。大驼峰（CamelCase）别名：lat。
                            longitude:
                              type: number
                              description: 该 IP 的地理经度。大驼峰（CamelCase）别名：lon。
                    payment_method:
                      type: object
                      description: 主体使用的支付方式。
                      properties:
                        method_type:
                          type: string
                          description: >-
                            支付方式类型：`bank_card`、`bank_account`、`crypto_wallet`、`ewallet`、`unhosted_wallet`、`other`。
                        account_id:
                          type: string
                          description: >-
                            账户标识符（例如
                            IBAN、地址）。对于加密筛查，此处应包含该参与者的地址。入站交易哈希筛查需要该主体的服务/客户充值地址。出站筛查使用交易对手的目标钱包。在比特币或
                            Lightning 上的加密转账中，它可能是 Lightning 付款请求（BOLT11
                            发票、BOLT12 报价、LNURL）或 Lightning 地址：Didit
                            将其指定的收款人存储为账户（未指定时为 ""），并将请求内容存储在 Travel Rule 转账的
                            `chain_details.lightning` 上。存储后最多 255 个字符。在比特币或
                            Lightning 上的加密转账中，它可能是 Lightning 付款请求（BOLT11
                            发票、BOLT12 报价、LNURL）或 Lightning 地址：Didit
                            将其指定的收款人存储为账户（未指定时为 ""），并将请求内容存储在 Travel Rule 转账的
                            `chain_details.lightning` 上。存储后最多 255 个字符。
                        memo:
                          type: string
                          maxLength: 256
                          description: >-
                            在 memo 网络（XRP、XLM、EOS、ATOM、HBAR）上作为钱包一部分的目标标签或
                            memo。在单个共享交易所地址上，每个 memo 都是独立的支付方式。XRP：目标标签，0 到
                            4294967295 之间的整数（接受 JSON 数字）。XLM：最多 28 字节的文本 memo、64
                            位 ID 或十六进制的 32 字节哈希。EOS：最多 256 字节。ATOM：最多 256
                            个字符。HBAR：最多 100
                            字节。Bitcoin、EVM、Solana、Tron、Litecoin、Bitcoin
                            Cash、Dogecoin 和 Lightning 钱包不接受 memo：传入 memo 会返回
                            `400`。别名：`destinationTag` 或 `destination_tag`。
                        issuing_country:
                          type: string
                          description: 签发方的 ISO 3166-1 alpha-3 国家/地区代码。
                counterparty:
                  type: object
                  description: 交易对手（可选）。
                  properties:
                    entity_type:
                      type: string
                      description: 主体类型：`individual` 或 `company`。
                    vendor_data:
                      type: string
                      description: 您为交易对手指定的内部标识符。
                    full_name:
                      type: string
                      description: 交易对手的姓名。
                    first_name:
                      type: string
                    last_name:
                      type: string
                    date_of_birth:
                      type: string
                      format: date
                    address:
                      type: object
                      description: 包含 `country`（ISO 3166-1 alpha-3）的地址对象。
                    institution_details:
                      type: object
                    device_context:
                      type: object
                      description: >-
                        交易对手的设备上下文。browser_family 和 platform 必须作为显式顶层键发送，它们不会从
                        user_agent 中派生。
                      properties:
                        fingerprint:
                          type: string
                          description: 唯一设备指纹。
                        persistent_device_id:
                          type: string
                          description: 跨会话的稳定设备标识符（v2 指纹架构）。
                        user_agent:
                          type: string
                          description: 浏览器或应用的 user agent 字符串。驼峰式命名别名：userAgent。
                        browser_family:
                          type: string
                          description: >-
                            浏览器家族（例如 Chrome、Firefox、Safari）。必须显式发送 — 它不会从
                            user_agent 推导。驼峰式命名别名：browserFamily。
                        browser_version:
                          type: string
                          description: 浏览器版本字符串。必须显式发送。驼峰式命名别名：browserVersion。
                        platform:
                          type: string
                          description: >-
                            平台标识符（web、ios、android、macos、windows、linux）。必须显式发送 —
                            不会从 user_agent 推断得出。
                        os_family:
                          type: string
                          description: 操作系统系列（例如 iOS、Android、Windows）。驼峰命名别名：osFamily。
                        os_version:
                          type: string
                          description: 操作系统版本字符串。驼峰命名别名：osVersion。
                        accept_language:
                          type: string
                          description: Accept-Language 请求头的值。CamelCase 别名：acceptLang。
                        session_id:
                          type: string
                          description: 交易对手会话的会话标识符。存储在元数据中。CamelCase 别名：sessionId。
                        session_age_ms:
                          type: number
                          description: 交易发生时用户会话的时长（毫秒）。驼峰式别名：sessionAgeMs。
                        network_context:
                          type: object
                          description: 包含 IP 地址和地理位置的网络上下文。顶层 ipInfo 块也会合并到此对象中。
                          properties:
                            ip_address:
                              type: string
                              description: 客户端 IP 地址。驼峰命名别名：ip。
                            ip_country_code:
                              type: string
                              description: >-
                                基于地理位置解析的 IP 所在国家/地区（ISO 3166-1
                                alpha-3）。驼峰命名别名：countryCode3。
                            latitude:
                              type: number
                              description: 该 IP 的地理纬度。大驼峰（CamelCase）别名：lat。
                            longitude:
                              type: number
                              description: 该 IP 的地理经度。大驼峰（CamelCase）别名：lon。
                    payment_method:
                      type: object
                      description: >-
                        交易对手使用的支付方式。在 travelRule 交易中，`method_type:
                        "unhosted_wallet"` 将交易对手钱包声明为自托管钱包：转账将跳过交易对手 VASP 路由，直接以
                        `UNCONFIRMED_OWNERSHIP` 状态创建，并且（当启用
                        `auto_wallet_verification` 时）会自动生成钱包所有权微件会话并在交易的
                        `action_required` 块中返回。
                      properties:
                        method_type:
                          type: string
                          description: >-
                            支付方式类型：`bank_card`、`bank_account`、`crypto_wallet`、`ewallet`、`unhosted_wallet`、`other`。使用
                            `unhosted_wallet` 声明用于 Travel Rule 的自托管钱包。
                        account_id:
                          type: string
                          description: >-
                            账户标识符（例如 IBAN 或地址）。在比特币或 Lightning 上的加密转账中，它可能是
                            Lightning 付款请求（BOLT11 发票、BOLT12 报价、LNURL）或 Lightning
                            地址：Didit 将其指定的收款人存储为账户（未指定时为 ""），并将请求内容存储在 Travel
                            Rule 转账的 `chain_details.lightning` 上。存储后最多 255
                            个字符。在比特币或 Lightning 上的加密转账中，它可能是 Lightning
                            付款请求（BOLT11 发票、BOLT12 报价、LNURL）或 Lightning 地址：Didit
                            将其指定的收款人存储为账户（未指定时为 ""），并将请求内容存储在 Travel Rule 转账的
                            `chain_details.lightning` 上。存储后最多 255 个字符。
                        memo:
                          type: string
                          maxLength: 256
                          description: >-
                            在 memo 网络（XRP、XLM、EOS、ATOM、HBAR）上作为钱包一部分的目标标签或
                            memo。在单个共享交易所地址上，每个 memo 都是独立的支付方式。XRP：目标标签，0 到
                            4294967295 之间的整数（接受 JSON 数字）。XLM：最多 28 字节的文本 memo、64
                            位 ID 或十六进制的 32 字节哈希。EOS：最多 256 字节。ATOM：最多 256
                            个字符。HBAR：最多 100
                            字节。Bitcoin、EVM、Solana、Tron、Litecoin、Bitcoin
                            Cash、Dogecoin 和 Lightning 钱包不接受 memo：传入 memo 会返回
                            `400`。别名：`destinationTag` 或 `destination_tag`。
                        issuing_country:
                          type: string
                custom_properties:
                  type: object
                  description: 附加到交易的任意键值对。可以在规则条件中通过字段路径 `custom_values.<key>` 引用每个键。
                  additionalProperties: true
                  example:
                    merchant_id: test
                    bank_name: test_2
                travel_rule_details:
                  type: object
                  description: >-
                    Travel Rule 数据。启用 Travel Rule 且 transaction_category 为
                    travel_rule 时，Didit 会自行执行信息交换：忽略 status、protocol、required 和
                    obligations_count，并使用 originator_data、beneficiary_data 和
                    metadata。否则 Didit 会将这些值存储为被动的 Travel Rule 记录。开启 Travel Rule
                    期间，达到或超过您阈值的出账转账必须携带其制度所要求的信息（欧盟 TFR 或 FATF 第 16
                    号建议），并在您发送的一侧进行检查：缺少字段会在
                    `travel_rule_details.originator_data` 或
                    `travel_rule_details.beneficiary_data` 下返回 400，例如“欧盟 TFR
                    要求提供汇款人姓名。”
                  required:
                    - status
                  properties:
                    status:
                      type: string
                      description: >-
                        每当您发送 travel_rule_details 时必填。Travel Rule 转账状态之一（例如
                        AWAITING_COUNTERPARTY、COMPLETED、NOT_APPLICABLE）；同样接受并映射小写和驼峰拼写以及旧版值
                        UNKNOWN、COMPLIANT、PENDING_ACTION、PENDING_COUNTERPARTY、FAILED
                        和 EXEMPT。任何其他值均返回 400。
                    protocol:
                      type: string
                    required:
                      type: boolean
                    obligations_count:
                      type: integer
                    originator_data:
                      type: object
                      description: >-
                        汇款人方，表示为扁平字段或单个 IVMS 101 人员。对于已通过 KYC 验证的用户，Didit
                        会将验证中包含的字段替换为已核验的值（参见
                        `metadata.originator_provenance`）。必须是一个对象：传入其他类型将返回
                        `400`。在支持 memo 的网络上，`memo` 键指定汇款人钱包的 memo 或标签。
                    beneficiary_data:
                      type: object
                      description: >-
                        收款人方，以扁平字段或单个 IVMS 101 人员形式呈现。必须是一个对象：其他任何类型都会返回
                        `400`。为了对转账进行路由，Didit 会读取 `wallet_address`（若为空则从
                        `counterparty.payment_method.account_id` 填充）、`chain`（从
                        `transaction_details.crypto_params.crypto_chain` 填充，或者当
                        `currency` 指明支持的链时从其填充）、`name`（回退为
                        `counterparty.full_name`）、`travel_address`、`counterparty_vasp_name`、`counterparty_vasp_lei`
                        和 `counterparty_vasp_email`。在 memo 网络上，`memo` 指定收款人钱包的
                        memo 或标签；`wallet_address` 和 `memo` 优先于交易对手的支付方式。
                    metadata:
                      type: object
                    utxo:
                      allOf:
                        - $ref: '#/components/schemas/TravelRuleUtxo'
                      description: >-
                        可选，仅限 UTXO 链（BTC、LTC、BCH、DOGE）。交易的输入和输出，当您未明确声明时，Didit
                        会据此推断汇款人钱包和收款人输出。
                    originator:
                      type: object
                      description: >-
                        IVMS 101 汇款人数据块：`originatorPersons`（一个 `naturalPerson` 或
                        `legalPerson`；法人使该方成为企业）和 `accountNumber`（地址）。当
                        `originator_data` 对象为空时使用。格式错误的数据块将返回 400 响应，错误键为其路径，例如
                        `originator.originatorPersons`。
                    beneficiary:
                      type: object
                      description: >-
                        IVMS 101 收款人数据块：`beneficiaryPersons`（一个 `naturalPerson`
                        或 `legalPerson`；法人使该方成为企业）和 `accountNumber`（地址）。当
                        `beneficiary_data` 对象为空时使用。格式错误的数据块将返回以其路径为键的 400 响应，例如
                        `beneficiary.beneficiaryPersons`。
                    ivms101:
                      type: object
                      description: >-
                        封装在一个 IVMS 101 对象中的 `originator` 和 `beneficiary` 块（也接受
                        `IVMS101`）。顶层块优先于包装器内的块。
                network_snapshot:
                  type: object
                  description: 预计算的网络图谱快照。
                  properties:
                    nodes:
                      type: array
                      items:
                        type: object
                    edges:
                      type: array
                      items:
                        type: object
                    metrics:
                      type: object
                include_crypto_screening:
                  type: boolean
                  nullable: true
                  description: >-
                    用于加密货币区块链分析筛查的逐笔交易覆盖项。当为 `true` 时，无论应用默认设置如何，都会执行加密货币筛查。当为
                    `false` 时，即使在应用设置中已启用，也会跳过加密货币筛查。省略或为 `null`
                    时，使用在控制台中配置的应用级默认设置。加密货币筛查需要
                    `transaction_details.direction`、`currency_kind:
                    "crypto"`、一条链/币种，以及根据交易方向选取的钱包地址：入账转账前筛查使用
                    `counterparty.payment_method.account_id`，入账交易哈希筛查使用
                    `subject.payment_method.account_id`，出账筛查使用
                    `counterparty.payment_method.account_id`。当
                    `transaction_details.payment_reference_id` 包含区块链交易哈希时，Didit
                    会执行交易筛查并在可用时返回交易摘要增强信息。
              required:
                - transaction_id
                - transaction_category
                - transaction_details
                - subject
            examples:
              Minimal fiat withdrawal:
                summary: 法定货币出站转账可接受的最小 payload
                value:
                  transaction_id: your-txn-2026-05-17-001
                  transaction_category: finance
                  transaction_details:
                    direction: outbound
                    amount: 1500
                    currency: EUR
                    action_type: withdrawal
                  subject:
                    entity_type: individual
                    vendor_data: user-12345
                    full_name: Maria Garcia
              Crypto outbound with screening:
                summary: 向非托管钱包的出向加密货币提现，可选筛查
                value:
                  transaction_id: your-txn-2026-05-17-002
                  transaction_category: finance
                  include_crypto_screening: true
                  transaction_details:
                    direction: outbound
                    amount: 0.5
                    currency: BTC
                    currency_kind: crypto
                    amount_in_default_currency: 32500
                    default_currency: USD
                    action_type: withdrawal
                  subject:
                    entity_type: individual
                    vendor_data: user-12345
                    full_name: Maria Garcia
                    payment_method:
                      method_type: crypto_wallet
                      account_id: bc1qexampleexchangewalletaddressxyz
                      issuing_country: ESP
                  counterparty:
                    entity_type: individual
                    payment_method:
                      method_type: unhosted_wallet
                      account_id: bc1qexampleexternalwalletaddressabc
              Travel Rule transfer:
                summary: 包含 Travel Rule 汇款人/收款人数据的出向加密货币转账
                value:
                  transaction_id: your-txn-2026-05-17-003
                  transaction_category: travel_rule
                  transaction_details:
                    direction: outbound
                    amount: 25000
                    currency: USDT
                    currency_kind: crypto
                    action_type: transfer
                  subject:
                    entity_type: individual
                    vendor_data: user-12345
                    full_name: Maria Garcia
                    date_of_birth: '1992-03-14'
                    address:
                      country: ESP
                      town: Madrid
                      street: Calle Mayor 1
                      post_code: '28013'
                  counterparty:
                    entity_type: individual
                    full_name: John Beneficiary
                    institution_details:
                      name: Beneficiary VASP, Inc.
                      code: BVASP-US
                  travel_rule_details:
                    status: AWAITING_COUNTERPARTY
                    protocol: IVMS101
                    required: true
                    originator_data:
                      name: Maria Garcia
                    beneficiary_data:
                      name: John Beneficiary
      responses:
        '201':
          description: >-
            交易已提交并受监控。响应体为完整的交易详情（结构与 `GET /v3/transactions/{transaction_id}/`
            相同），反映已应用的规则结果。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionDetail'
              examples:
                Approved with no rule hits:
                  value:
                    uuid: abcdef12-3456-4890-abcd-ef1234567890
                    environment: live
                    transaction_number: 4123
                    txn_id: your-txn-2026-05-17-001
                    txn_date: '2026-05-17T08:42:00Z'
                    zone_id: Europe/Madrid
                    transaction_type: finance
                    action_type: withdrawal
                    direction: OUTBOUND
                    status: APPROVED
                    source: LIVE
                    amount: '1500'
                    currency: EUR
                    currency_type: fiat
                    amount_in_default_currency: '1620.45'
                    default_currency_code: USD
                    preferred_currency_amount: '1620.45'
                    preferred_currency_code: USD
                    payment_details: Withdrawal to crypto wallet
                    payment_txn_id: null
                    score: 0
                    severity: null
                    decision_reason_code: null
                    decision_reason_label: null
                    vendor_data: user-12345
                    metadata:
                      subject:
                        entity_type: individual
                        vendor_data: user-12345
                        full_name: Maria Garcia
                        address: {}
                        institution_details: {}
                        device_context: {}
                      counterparty: {}
                    props: {}
                    tags: []
                    parties:
                      - uuid: b1111111-2222-4333-8444-555555555555
                        role: APPLICANT
                        entity_type: individual
                        kind: USER
                        vendor_data: user-12345
                        full_name: Maria Garcia
                        first_name: null
                        last_name: null
                        country_code: null
                        dob: null
                        address: {}
                        institution_info: {}
                        device: {}
                        external_party_snapshot: null
                    payment_methods: []
                    documents: []
                    activities:
                      - uuid: d4e5f6a7-8901-4bcd-9ef0-123456789abc
                        activity_type: TRANSACTION_CREATED
                        source: TRANSACTION
                        status: APPROVED
                        title: withdrawal
                        description: Transaction recorded.
                        metadata: {}
                        occurred_at: '2026-05-17T08:42:11Z'
                    alerts: []
                    rule_runs: []
                    provider_results: []
                    travel_rule: null
                    network_snapshot: null
                    remediation: null
                    action_required: null
                    cost_breakdown: null
                Flagged for review:
                  value:
                    uuid: abcdef12-3456-4890-abcd-ef1234567891
                    environment: live
                    transaction_number: 4124
                    txn_id: your-txn-2026-05-17-002
                    txn_date: '2026-05-17T08:42:00Z'
                    zone_id: Europe/Madrid
                    transaction_type: finance
                    action_type: withdrawal
                    direction: OUTBOUND
                    status: IN_REVIEW
                    source: LIVE
                    amount: '0.5'
                    currency: BTC
                    currency_type: crypto
                    amount_in_default_currency: '32500'
                    default_currency_code: USD
                    preferred_currency_amount: '32500'
                    preferred_currency_code: USD
                    payment_details: Withdrawal to crypto wallet
                    payment_txn_id: null
                    score: 78
                    severity: HIGH
                    decision_reason_code: WALLET_HIGH_RISK
                    decision_reason_label: Destination wallet flagged as high risk
                    vendor_data: user-12345
                    metadata:
                      subject:
                        entity_type: individual
                        vendor_data: user-12345
                        full_name: Maria Garcia
                        address: {}
                        institution_details: {}
                        device_context: {}
                      counterparty: {}
                    props:
                      order_id: ord-9988
                    tags: []
                    parties:
                      - uuid: b1111111-2222-4333-8444-555555555555
                        role: APPLICANT
                        entity_type: individual
                        kind: USER
                        vendor_data: user-12345
                        full_name: Maria Garcia
                        first_name: null
                        last_name: null
                        country_code: null
                        dob: null
                        address: {}
                        institution_info: {}
                        device: {}
                        external_party_snapshot: null
                    payment_methods: []
                    documents: []
                    activities: []
                    alerts:
                      - uuid: a7b8c9d0-1234-4abc-9def-567890abcdef
                        title: Destination wallet flagged as high risk
                        description: Provider risk score exceeded the configured threshold.
                        severity: HIGH
                        status: OPEN
                        source: RULE
                        metadata: {}
                        created_at: '2026-05-17T08:42:12Z'
                        due_at: null
                    rule_runs:
                      - uuid: e5f6a7b8-9012-4cde-af01-23456789abcd
                        rule: f6a7b8c9-0123-4def-b012-3456789abcde
                        rule_title: High-risk wallet screening
                        rule_description: null
                        rule_category: crypto
                        matched: true
                        is_test: false
                        mode: ACTIVE
                        severity: HIGH
                        score_delta: 78
                        status_target: IN_REVIEW
                        action_summary: score +78; change_status:IN_REVIEW
                        metadata: {}
                        created_at: '2026-05-17T08:42:12Z'
                    provider_results: []
                    travel_rule: null
                    network_snapshot: null
                    remediation: null
                    action_required: null
                    cost_breakdown: null
        '400':
          description: 验证失败（缺少必填字段、重复的 `transaction_id`、未知的枚举值、无效的货币等）。
          content:
            application/json:
              examples:
                Missing required field:
                  value:
                    transaction_details:
                      amount:
                        - This field is required.
                Duplicate transaction_id:
                  value:
                    transaction_id:
                      - A transaction with this transaction_id already exists.
                Invalid category:
                  value:
                    non_field_errors:
                      - Unsupported transaction category.
                Missing subject identity:
                  value:
                    subject:
                      - subject.vendor_data and subject.full_name are required.
                Blocklisted participant:
                  value:
                    vendor_data:
                      - >-
                        The individual 'user-12345' is in the blocklist and
                        cannot participate in transactions.
        '403':
          description: >-
            缺少、无效或已撤销的 API 密钥，或者该密钥无法为此应用提交交易。缺少密钥返回 `403`；错误、已撤销或已过期的密钥返回
            `401`。
          content:
            application/json:
              examples:
                Forbidden:
                  value:
                    detail: You do not have permission to perform this action.
        '409':
          description: >-
            在处理当前请求时，另一个具有相同 `transaction_id`
            的请求创建了交易，因此两个同时发起的提交中只有一个会成功。请读取现有交易，而不是重新提交。
          content:
            application/json:
              examples:
                Concurrent duplicate:
                  value:
                    detail: A transaction with this transaction_id already exists.
        '429':
          description: >-
            超出速率限制：交易创建和事件摄入（`POST /v3/transactions/`、`POST /v3/events/`、`POST
            /v3/events/batch/`）共享每个 API 密钥每分钟 600 次请求的配额，独立于所有其他写入请求共享的 300
            次配额。请等待 `Retry-After` 秒，然后重试。
          headers:
            Retry-After:
              description: 重试前需等待的秒数，向上取整以确保重试落在下一个时间窗口内。
              schema:
                type: integer
                minimum: 1
                example: 30
          content:
            application/json:
              examples:
                Throttled:
                  value:
                    detail: >-
                      Ingestion rate limit exceeded. You can make up to 600
                      requests per minute.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: |-
            curl -X POST 'https://verification.didit.me/v3/transactions/' \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{
                "transaction_id": "your-txn-2026-05-17-001",
                "transaction_category": "finance",
                "transaction_details": {
                  "direction": "outbound",
                  "amount": 1500,
                  "currency": "EUR",
                  "action_type": "withdrawal"
                },
                "subject": {
                  "entity_type": "individual",
                  "vendor_data": "user-12345",
                  "full_name": "Maria Garcia"
                }
              }'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.transactions.create(
                transaction_id="your-txn-2026-05-17-001",
                transaction_category="finance",
                transaction_details={
                    "direction": "outbound",
                    "amount": 1500.0,
                    "currency": "EUR",
                    "action_type": "withdrawal",
                },
                subject={
                    "entity_type": "individual",
                    "vendor_data": "user-12345",
                    "full_name": "Maria Garcia",
                },
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: |-
            import Didit from "@didit-protocol/sdk-node";

            // Reads DIDIT_API_KEY.
            const didit = new Didit();

            const result = await didit.transactions.create({
              transaction_id: "your-txn-2026-05-17-001",
              transaction_category: "finance",
              transaction_details: {
                direction: "outbound",
                amount: 1500.0,
                currency: "EUR",
                action_type: "withdrawal",
              },
              subject: {
                entity_type: "individual",
                vendor_data: "user-12345",
                full_name: "Maria Garcia",
              },
            });
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.Create(ctx, didit.TransactionsCreateParams{\n\tTransactionID:       \"your-txn-2026-05-17-001\",\n\tTransactionCategory: \"finance\",\n\tTransactionDetails: didit.TransactionsCreateParamsTransactionDetails{\n\t\tDirection:  \"outbound\",\n\t\tAmount:     1500.0,\n\t\tCurrency:   \"EUR\",\n\t\tActionType: didit.String(\"withdrawal\"),\n\t},\n\tSubject: didit.TransactionsCreateParamsSubject{\n\t\tEntityType: didit.String(\"individual\"),\n\t\tVendorData: \"user-12345\",\n\t\tFullName:   \"Maria Garcia\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;

            import me.didit.types.TransactionsCreateParams;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.transactions().create(TransactionsCreateParams.builder()
                    .transactionId("your-txn-2026-05-17-001")
                    .transactionCategory(TransactionsCreateParams.TransactionCategory.of("finance"))
                    .transactionDetails(TransactionsCreateParams.TransactionDetails.builder()
                            .direction(TransactionsCreateParams.TransactionDetails.Direction.of("outbound"))
                            .amount(1500.0)
                            .currency("EUR")
                            .actionType("withdrawal")
                            .build())
                    .subject(TransactionsCreateParams.Subject.builder()
                            .entityType("individual")
                            .vendorData("user-12345")
                            .fullName("Maria Garcia")
                            .build())
                    .build());
            System.out.println(result);
        - lang: php
          label: PHP
          source: |-
            <?php

            require 'vendor/autoload.php';

            use Didit\DiditClient;

            // Reads DIDIT_API_KEY.
            $didit = new DiditClient();

            $result = $didit->transactions->create([
                'transaction_id' => 'your-txn-2026-05-17-001',
                'transaction_category' => 'finance',
                'transaction_details' => [
                    'direction' => 'outbound',
                    'amount' => 1500.0,
                    'currency' => 'EUR',
                    'action_type' => 'withdrawal',
                ],
                'subject' => [
                    'entity_type' => 'individual',
                    'vendor_data' => 'user-12345',
                    'full_name' => 'Maria Garcia',
                ],
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

            # Reads DIDIT_API_KEY.
            didit = Didit::Client.new

            result = didit.transactions.create(
              transaction_id: "your-txn-2026-05-17-001",
              transaction_category: "finance",
              transaction_details: {
                direction: "outbound",
                amount: 1500.0,
                currency: "EUR",
                action_type: "withdrawal",
              },
              subject: {
                entity_type: "individual",
                vendor_data: "user-12345",
                full_name: "Maria Garcia",
              }
            )
            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            var result = await client.Transactions.CreateAsync(new
            TransactionsCreateParams

            {
                TransactionId = "your-txn-2026-05-17-001",
                TransactionCategory = "finance",
                TransactionDetails = new()
                {
                    Direction = "outbound",
                    Amount = 1500.0,
                    Currency = "EUR",
                    ActionType = "withdrawal",
                },
                Subject = new()
                {
                    EntityType = "individual",
                    VendorData = "user-12345",
                    FullName = "Maria Garcia",
                },
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    TravelRuleUtxo:
      type: object
      description: >-
        UTXO 转账（BTC、LTC、BCH、DOGE）的输入与输出。仅在这些链上支持：在任何其他链上将返回 `400`。Didit
        会据此推断汇款人钱包（申报的钱包，否则为贡献金额最多的输入地址）和收款人输出（申报的输出，否则为唯一未将找零退回输入地址的输出，否则为支付转账金额的那笔输出）。结果保存在转账的
        `chain_details` 中。
      required:
        - outputs
      properties:
        inputs:
          type: array
          maxItems: 1000
          items:
            $ref: '#/components/schemas/TravelRuleUtxoEntry'
          description: 可选。若没有输入，则不会推断汇款人，也不会识别找零输出。
        outputs:
          type: array
          minItems: 1
          maxItems: 1000
          items:
            $ref: '#/components/schemas/TravelRuleUtxoEntry'
    TransactionDetail:
      type: object
      description: >-
        单个交易的完整监控记录，由 `GET /v3/transactions/{transaction_id}/` 和 `POST
        /v3/transactions/` 返回。
      properties:
        uuid:
          type: string
          format: uuid
          description: Didit 稳定的交易标识符。用作后续调用的 `{transaction_id}`。
        environment:
          type: string
          enum:
            - live
            - sandbox
          description: >-
            拥有该交易的应用的环境。`sandbox` 交易会被存储，但绝不会被评估、筛查、通知或计费，因此其空的 `rule_runs`
            表示“未评估”。
        transaction_number:
          type: integer
          description: 控制台中显示的应用范围内连续交易序号（例如 `4123`）。
        txn_id:
          type: string
          description: 您在创建时提供的 `transaction_id`（最多 128 个字符）。每个应用唯一。
        txn_date:
          type: string
          format: date-time
          description: 交易发生的时间（来自 `transaction_at`；默认为提交时间）。
        zone_id:
          type: string
          nullable: true
          description: 创建时提供的 IANA 时区标识符。
        transaction_type:
          type: string
          description: >-
            存储的顶级类别：`finance`、`kyc`、`travelRule`、`userPlatformEvent`、`gamblingBet`、`gamblingLimitChange`、`gamblingBonusChange`、`auditTrailEvent`。请注意，即使以
            snake_case 提交，包含多个单词的值也会以 camelCase 形式返回。
        action_type:
          type: string
          description: 类别内的子类型（例如 `deposit`、`withdrawal`、`transfer`）。未提供时默认为该类别。
        direction:
          type: string
          enum:
            - INBOUND
            - OUTBOUND
          description: >-
            相对于主体的方向。无论提交时的大小写如何，均以大写形式存储（输入时接受
            `in`/`out`/`inbound`/`outbound`）。
        status:
          type: string
          enum:
            - APPROVED
            - IN_REVIEW
            - DECLINED
            - AWAITING_USER
          description: 当前监控裁决结果。创建交易时的状态为 `APPROVED`；规则可能会同步将其更改为 `IN_REVIEW`/`DECLINED`。
        source:
          type: string
          enum:
            - LIVE
            - IMPORTED
          description: 记录的生成来源：通过 API 或 SDK 提交的交易为 `LIVE`，通过控制台导入加载的交易为 `IMPORTED`。
        amount:
          type: string
          description: >-
            作为十进制字符串的交易金额，已去除末尾零（例如
            `"1500"`、`"0.5"`、`"0.123456789012345678"`）。最多 18 位小数。
        currency:
          type: string
          description: >-
            `amount` 的货币代码。接受任何 ISO 4217 字母代码（例如 `EUR`、`USD`、`NGN`）以及加密资产符号（例如
            `BTC`）。建议使用当前流通的代码。并非每个接受的代码都有汇率：当该代码没有可用汇率时（例如 ISO 会计单位 `XSU`，或
            Didit 未定价的加密资产符号），自动换算将失败，并且 `preferred_currency_amount` 将返回
            null，除非请求提供了预先换算的 `amount_in_default_currency`。
        currency_type:
          type: string
          nullable: true
          description: '`fiat` 或 `crypto`，与在 `currency_kind` 中提交的内容一致。'
        amount_in_default_currency:
          type: string
          nullable: true
          description: 您提供的预先换算金额，为去除了末尾零的十进制数字符串。
        default_currency_code:
          type: string
          nullable: true
        preferred_currency_amount:
          type: string
          nullable: true
          description: '`amount` 在可用时折算为应用的首选货币。'
        preferred_currency_code:
          type: string
          nullable: true
        payment_details:
          type: string
          nullable: true
          description: 提交内容中的自由文本付款参考号或附言。
        payment_txn_id:
          type: string
          nullable: true
          description: 来自 `payment_reference_id` 的外部支付系统参考标识（例如区块链交易哈希）。
        score:
          type: integer
          description: 规则累计的风险评分（通常为 0–100）。数值越高 = 风险越大。
        severity:
          type: string
          nullable: true
          enum:
            - UNKNOWN
            - LOW
            - MEDIUM
            - HIGH
            - CRITICAL
          description: >-
            由规则/提供商设置的分类风险严重程度（`UNKNOWN`、`LOW`、`MEDIUM`、`HIGH`、`CRITICAL`）。在设置该值之前为
            `null`。
        decision_reason_code:
          type: string
          nullable: true
          description: 当前 `status` 的机器可读原因。
        decision_reason_label:
          type: string
          nullable: true
          description: '`decision_reason_code` 的便于人类阅读的标签。'
        vendor_data:
          type: string
          nullable: true
          description: 申请人 `vendor_data` 的便捷副本。
        metadata:
          type: object
          description: 创建时提交的 `subject` 和 `counterparty` payload 快照。
        props:
          type: object
          description: >-
            您在创建时提供的 `custom_properties`。每个键都可以在规则条件中通过 `custom_values.<key>`
            访问。
        tags:
          type: array
          items:
            type: object
            properties:
              uuid:
                type: string
                format: uuid
              name:
                type: string
              color:
                type: string
              description:
                type: string
                nullable: true
              source:
                type: string
                enum:
                  - didit
                  - custom
                description: 该标签是 Didit 预设还是自定义标签。
          description: 附加到交易的标签（手动或通过规则）。
        parties:
          type: array
          items:
            type: object
            properties:
              uuid:
                type: string
                format: uuid
              role:
                type: string
                enum:
                  - APPLICANT
                  - REMITTER
                  - BENEFICIARY
                  - COUNTERPARTY
                description: 当事方角色。创建 endpoint 会分配 `APPLICANT`（主体）和 `COUNTERPARTY`。
              entity_type:
                type: string
                enum:
                  - individual
                  - company
                  - external
                  - unhostedWallet
              kind:
                type: string
                enum:
                  - USER
                  - BUSINESS
                  - EXTERNAL
                description: >-
                  `USER`/`BUSINESS` 当事方通过 `vendor_data` 关联回 Didit
                  拥有的实体。`EXTERNAL` 当事方背后没有 Didit 实体。
              vendor_data:
                type: string
                nullable: true
                description: 您的内部用户/企业标识符。
              full_name:
                type: string
                nullable: true
              first_name:
                type: string
                nullable: true
              last_name:
                type: string
                nullable: true
              country_code:
                type: string
                nullable: true
                description: 来自提交的 `address.country` 的国家/地区代码（通常为 ISO 3166-1 alpha-3）。
              dob:
                type: string
                format: date
                nullable: true
                description: 来自提交的 `date_of_birth` 的出生日期。
              address:
                type: object
                description: 提交的地址对象。省略时为 `{}`。
              institution_info:
                type: object
                description: 提交的机构详情。省略时为 `{}`。
              device:
                type: object
                description: >-
                  归一化的设备上下文，在提供了 IP 时包含 network_context 下的服务端 IP
                  增强数据（地理位置、VPN/数据中心标志）。
                properties:
                  fingerprint:
                    type: string
                    description: 唯一设备指纹。
                  persistent_device_id:
                    type: string
                    description: 跨会话的稳定设备标识符（v2 指纹架构）。
                  user_agent:
                    type: string
                    description: 浏览器或应用的 user agent 字符串。
                  browser_family:
                    type: string
                    description: 浏览器家族（例如 Chrome、Firefox、Safari）。
                  browser_version:
                    type: string
                    description: 浏览器版本字符串。
                  platform:
                    type: string
                    description: 平台标识符（web、ios、android、macos、windows、linux）。
                  os_family:
                    type: string
                    description: 操作系统系列（例如 iOS、Android、Windows）。
                  os_version:
                    type: string
                    description: 操作系统版本字符串。
                  accept_language:
                    type: string
                    description: Accept-Language 请求头的值。
                  session_id:
                    type: string
                    description: 会话标识符（存储在元数据中）。
                  session_age_ms:
                    type: number
                    description: 会话时长（毫秒）。
                  network_context:
                    type: object
                    description: 包含 IP 地址和地理位置的网络上下文。
                    properties:
                      ip_address:
                        type: string
                        description: 客户端 IP 地址。
                      ip_country_code:
                        type: string
                        description: 基于地理位置解析的 IP 所在国家/地区（ISO 3166-1 alpha-3）。
                      latitude:
                        type: number
                        description: 该 IP 的地理纬度。
                      longitude:
                        type: number
                        description: 该 IP 的地理经度。
              external_party_snapshot:
                type: object
                nullable: true
                description: '`EXTERNAL` 当事方数据的冻结副本。当该当事方关联到 Didit 用户或企业时为 `null`。'
          description: 交易当事方（申请人、交易对手）。
        payment_methods:
          type: array
          items:
            type: object
            properties:
              uuid:
                type: string
                format: uuid
              payment_method_type:
                type: string
                enum:
                  - bank_card
                  - bank_account
                  - e_wallet
                  - crypto_wallet
                  - unhosted_wallet
                  - other
              label:
                type: string
                nullable: true
              fingerprint:
                type: string
                nullable: true
                description: >-
                  针对 `type:account_id:issuing_country` 的
                  SHA-256，用于关联同一工具重复使用情况的稳定标识符。
              account_id:
                type: string
                nullable: true
                description: 账户标识符（IBAN、地址、银行卡 token 等）。
              issuing_country:
                type: string
                nullable: true
              owner_kind:
                type: string
                enum:
                  - USER
                  - BUSINESS
                  - EXTERNAL
              vendor_data:
                type: string
                nullable: true
                description: 您对所属用户/企业的标识符。
              owner_name:
                type: string
                nullable: true
              institution_info:
                type: object
              details:
                type: object
                description: 提交的原始 `payment_method` 对象。
              external_owner_snapshot:
                type: object
                nullable: true
              role:
                type: string
                enum:
                  - SOURCE
                  - DESTINATION
                  - FUNDING
                  - BENEFICIARY
                description: >-
                  此方式在交易中的使用方式。创建 endpoint 会根据交易方向分配
                  `SOURCE`/`DESTINATION`（出向：主体 = SOURCE；入向：主体 = DESTINATION）。
          description: 关联至交易的支付方式。
        documents:
          type: array
          description: 从控制台附加到交易的文件。若无则为 `[]`。
          items:
            type: object
            properties:
              uuid:
                type: string
                format: uuid
              label:
                type: string
                nullable: true
              note:
                type: string
                nullable: true
              uploaded_by:
                type: string
                nullable: true
              created_at:
                type: string
                format: date-time
              files:
                type: array
                items:
                  type: object
                  properties:
                    uuid:
                      type: string
                      format: uuid
                    file_url:
                      type: string
                      format: uri
                      nullable: true
                      description: 短期签名下载 URL；请在需要时获取，而不是直接存储。
                    original_filename:
                      type: string
                      nullable: true
                    file_size:
                      type: integer
                      nullable: true
        activities:
          type: array
          items:
            type: object
            properties:
              uuid:
                type: string
                format: uuid
              activity_type:
                type: string
                description: >-
                  例如
                  `TRANSACTION_CREATED`、`TRANSACTION_NOTE_ADDED`、`TRANSACTION_STATUS_CHANGED`。
              source:
                type: string
              status:
                type: string
                nullable: true
              title:
                type: string
                nullable: true
              description:
                type: string
                nullable: true
              metadata:
                type: object
              occurred_at:
                type: string
                format: date-time
          description: 活动日志条目（创建、备注、人工审核、状态变更）。
        alerts:
          type: array
          items:
            type: object
            properties:
              uuid:
                type: string
                format: uuid
              title:
                type: string
              description:
                type: string
                nullable: true
              severity:
                type: string
                enum:
                  - UNKNOWN
                  - LOW
                  - MEDIUM
                  - HIGH
                  - CRITICAL
              status:
                type: string
                enum:
                  - OPEN
                  - INVESTIGATING
                  - AWAITING_USER
                  - PENDING_SAR
                  - SAR_FILED
                  - RESOLVED
                  - DISMISSED
              source:
                type: string
                enum:
                  - RULE
                  - PROVIDER
                  - MANUAL
              metadata:
                type: object
              created_at:
                type: string
                format: date-time
              due_at:
                type: string
                format: date-time
                nullable: true
          description: 当前始终为空。未结警报是指状态为 `IN_REVIEW` 或 `AWAITING_USER` 的交易。
        rule_runs:
          type: array
          items:
            type: object
            properties:
              uuid:
                type: string
                format: uuid
              rule:
                type: string
                format: uuid
                description: 已运行规则的 UUID。
              rule_title:
                type: string
              rule_description:
                type: string
                nullable: true
              rule_category:
                type: string
              matched:
                type: boolean
                description: 规则条件是否与该交易匹配。仅针对匹配的规则记录运行，因此生产环境中的评估结果始终为 `true`。
              is_test:
                type: boolean
                description: 当规则在 TEST 模式下运行时为 true（对状态/评分无影响）。
              mode:
                type: string
                enum:
                  - ACTIVE
                  - DISABLED
                  - TEST
              severity:
                type: string
                nullable: true
              score_delta:
                type: integer
                description: 由该规则的 `add_score` 操作添加的分数。
              status_target:
                type: string
                nullable: true
                description: 由 `change_status` 操作设置的状态（如果有）。
              action_summary:
                type: string
                nullable: true
                description: >-
                  规则执行的操作摘要，以 `; ` 连接（例如 `score +30; change_status:IN_REVIEW;
                  add_tag:high_risk_country`）。组成部分包括：`score
                  +N`、`change_status:<STATUS>`、`add_tag:<name>`、`add_note`、`add_to_list`、`open_case`。当规则未执行任何操作时为
                  `null`。
              metadata:
                type: object
                description: >-
                  评估详情：`scope_match`、`conditions[]` 和 `aggregations[]`。每个条件条目包含
                  `field`、`operator`、`expected_value`、从交易中读取的
                  `current_value`、`matched`、`group_index` 和
                  `group_logic`。每个聚合条目（频次 / 计数 / 求和）包含
                  `metric`、`field`、`operator`、`expected_value`、聚合计算得出的
                  `computed_value`、`window`、`filters`、`matched` 和
                  `sample_references`；延迟的异步聚合其 `computed_value: null` 且
                  `deferred: true`。嵌套条件组是一个 `conditions[]` 条目，其 `operator` 为
                  `any_of` 或 `all_of`，`field` 为 null，且其成员的结果位于其自身的 `conditions`
                  下。
              created_at:
                type: string
                format: date-time
          description: 逐条规则的执行结果：触发了哪条规则，以及产生了怎样的评分影响。
        provider_results:
          type: array
          items:
            type: object
            properties:
              uuid:
                type: string
                format: uuid
              provider:
                type: string
              result_type:
                type: string
                enum:
                  - FIAT_MONITORING
                  - WALLET_SCREENING
                  - TRANSACTION_SCREENING
                  - TRAVEL_RULE
                  - NETWORK_GRAPH
                  - CUSTOM
              status:
                type: string
              severity:
                type: string
                nullable: true
              score:
                type: integer
              summary:
                type: string
                nullable: true
              payload:
                type: object
                description: 原始供应商响应 payload。
              created_at:
                type: string
                format: date-time
          description: 原始供应商 payload（AML 筛查、区块链分析等）。
        travel_rule:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/TransactionTravelRule'
          description: >-
            Travel Rule 转账或核验。在提交了 `travel_rule_details` 时填充，以及在启用了 Travel Rule
            且创建交易时使用了 `transaction_category: travelRule` 时填充（即使没有
            `travel_rule_details`，Didit 也会自行发起信息交换）。不存在转账或核验时为
            `null`。在入账转账中，交易对手的 `originator_data` 和 `beneficiary_data`
            保持掩码状态（`data_masked: true`），直到钱包所有权得到确认。
        network_snapshot:
          type: object
          nullable: true
          description: >-
            规则引擎使用的相关交易/关联方图谱快照。可以随交易提交的 `network_snapshot`，也可以是 Didit 从成功的 AML
            钱包筛查中构建的图谱（会替换提交的快照）。两者均不存在时为 `null`。
          properties:
            uuid:
              type: string
              format: uuid
            nodes:
              type: array
              items:
                type: object
            edges:
              type: array
              items:
                type: object
            metrics:
              type: object
        remediation:
          type: object
          nullable: true
          description: 需要重新验证时向用户提供的补救会话。已被规范字段 `action_required` 取代；保留以向后兼容。
          properties:
            session_id:
              type: string
            session_token:
              type: string
            url:
              type: string
              format: uri
            status:
              type: string
        action_required:
          type: object
          nullable: true
          description: >-
            完成此交易所需的待处理终端用户操作，若无则为 null。Didit SDK
            默认会自动启动该操作，并在其完成时刷新交易。共有两种变体，通过 `type`
            进行区分：`verification_session`（由规则操作创建的托管验证会话）和
            `wallet_ownership`（为需要钱包控制权证明的 Travel Rule 转账自动生成的钱包所有权微件会话，受
            `auto_wallet_verification` Travel Rule
            设置管控）。当两者均适用时，`wallet_ownership` 具有更高优先级，因为它会阻断 Travel Rule 交互。
          oneOf:
            - $ref: '#/components/schemas/TransactionVerificationSessionAction'
            - $ref: '#/components/schemas/TransactionWalletOwnershipAction'
          discriminator:
            propertyName: type
            mapping:
              verification_session: '#/components/schemas/TransactionVerificationSessionAction'
              wallet_ownership: '#/components/schemas/TransactionWalletOwnershipAction'
        cost_breakdown:
          type: object
          nullable: true
          description: >-
            此交易的费用：`total_price` 和 `items`，每项收费一条记录，均包含
            `usage_type`、`price`、`details` 和 `created_at`。对同一笔交易重新筛查会产生一个新条目。
    TravelRuleUtxoEntry:
      type: object
      description: UTXO 交易的一个输入或输出，与区块链上记录的一致。
      required:
        - address
      properties:
        address:
          type: string
          maxLength: 128
        amount:
          type: string
          nullable: true
          description: 以代币自身为单位的十进制字符串（BTC，而非聪）。可选。
          example: '0.0125'
        txid:
          type: string
          maxLength: 128
          description: 可选。输入所花费的交易。
        vout:
          type: integer
          nullable: true
          minimum: 0
          description: 可选。输入所花费的输出索引。
    TransactionTravelRule:
      type: object
      description: >-
        交易的 Travel Rule 转账，正如 `GET /v3/transactions/{transaction_id}/`、`POST
        /v3/transactions/` 的 `201` 以及 `GET /v3/transactions/`
        的每行所返回的内容。`direction`、`rail`、`counterparty_vasp`、`delivery`、`discovery`、`reason`
        和 `next_actions` 的结构与 `PATCH
        /v3/transactions/{transaction_id}/travel-rule/`
        相同，因此读取一次交易即可了解其转账受阻的原因以及如何继续推进。
      properties:
        uuid:
          type: string
          format: uuid
        status:
          type: string
        protocol:
          type: string
          nullable: true
        required:
          type: boolean
        obligations_count:
          type: integer
        originator_data:
          type: object
          description: 汇款人方。对于入账转账，在所有权确认之前，交易对手的值将被掩码遮盖。
        beneficiary_data:
          type: object
          description: 收款人方。对于入账转账，在确认所有权之前，交易对手的值将被遮蔽。
        name_match:
          type: object
          nullable: true
          description: 决定转账的姓名比对结果（分数和严格程度）。在运行比对前为 null。比对的姓名与当事方一同脱敏。
        data_match:
          $ref: '#/components/schemas/TravelRuleDataMatch'
        mismatched_fields:
          type: array
          items:
            type: string
          description: '`data_match.mismatched_fields` 的快捷方式。无差异时为空。'
        data_unmasked:
          $ref: '#/components/schemas/TravelRuleDataUnmasked'
        data_masked:
          type: boolean
          description: 在此响应中交易对手的个人数据被遮蔽时为 True。
        metadata:
          type: object
        direction:
          type: string
          enum:
            - INBOUND
            - OUTBOUND
          description: 此笔转账属于交易的哪一方。
        rail:
          type: string
          nullable: true
          description: >-
            转账所走的通道：`INTERNAL`、`TRP`、`GTR`、`TRUST`、`VERIFYVASP`、`SYGNA` 或
            `EMAIL`（在沙盒应用上且由 Didit Test VASP 应答时为 `TEST_VASP`），在选定通道前为 `null`。
        counterparty_vasp:
          type: object
          nullable: true
          properties:
            name:
              type: string
            lei:
              type: string
            dd_score:
              type: integer
              description: 尽职调查评分，范围为 0 到 100，分数越高越好。分值范围与 VASP 名录相同。
            dd_score_breakdown:
              type: object
              description: >-
                对 dd_score 的各组件贡献度，每个组件一个对象（对应 VASP 目录中的
                jurisdiction、verification、protocol、lei、history、essentials、responsiveness），每个组件均包含
                {points, max, reason, detail}。在交易对手完成评估前为 {}。
              additionalProperties:
                type: object
                properties:
                  points:
                    type: number
                    description: 为该组件分配的点数。
                  max:
                    type: integer
                    description: 该组件可赋予的最大分值。
                  reason:
                    type: string
                    description: 组件判定结果的机器可读代码。
                  detail:
                    type: string
                    description: 易于阅读的积分授予原因。
            dd_assessed_at:
              type: string
              format: date-time
              nullable: true
              description: 尽职调查评估上次运行的时间。在对交易对手进行评估之前为 Null。
          description: 交易对手的名录条目；若转账未关联任何条目，则为 `null`。
        delivery:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/TravelRuleDelivery'
          description: >-
            该转账应发送给另一方的最新消息。若无需发送任何消息（例如金额低于 `threshold_amount` 或针对声明的自托管钱包），则为
            `null`。
        discovery:
          type: array
          description: Didit 查找交易对手的方式，每个运行的步骤对应一个条目。未运行发现流程时为空，例如对于入站转账。
          items:
            $ref: '#/components/schemas/TravelRuleDiscoveryStep'
        reason:
          type: string
          description: >-
            `COUNTERPARTY_VASP_NOT_FOUND` 或 `COUNTERPARTY_VASP_NOT_REACHABLE`
            转账受阻的原因；任何其他状态下为 `""`。首先由失败的投递决定（仅适用于
            `COUNTERPARTY_VASP_NOT_REACHABLE`）：`email_undeliverable`（邮件服务商拒绝了合规邮件，且没有可尝试的地址：发送时、发送提醒时或后续报告为永久退信）或
            `delivery_failed`（负责投递的通道彻底失败：网络通道拒绝了消息或重试次数耗尽、`TRP` 身份主机未应答，或交易对手的
            `TRP` 主机不接受查询）。否则由 `discovery` 追踪记录决定：`awaiting_end_user`（没有任何步骤指定
            Didit 可触达的交易对手）、`directory_match_no_route`（某步骤指定了名录中的 VASP，但该 VASP
            没有可用路由）、`picked_member_without_proven_wallet`（终端用户选择的 Didit
            客户尚未证明对该钱包的控制权），或者在追踪记录未提供其他原因时的
            `no_directory_match`。重新发送后转账会继续推进，因此该原因将被清除。参见[转账受阻的原因](/zh/transaction-monitoring/travel-rule#为什么转账会卡住)。
        next_actions:
          type: array
          description: >-
            推进转账的操作；除 `COUNTERPARTY_VASP_NOT_FOUND` 或
            `COUNTERPARTY_VASP_NOT_REACHABLE` 之外的任何状态均返回
            `[]`。`email_undeliverable` 提供 `update_compliance_email`，然后提供
            `resend`。`delivery_failed` 提供 `resend`。发现原因提供
            `select_counterparty_vasp`、`declare_self_hosted`、`add_vasp_hint` 和
            `resend`。
          items:
            $ref: '#/components/schemas/TravelRuleNextAction'
        chain_details:
          $ref: '#/components/schemas/TravelRuleChainDetails'
    TransactionVerificationSessionAction:
      title: Verification session
      type: object
      properties:
        type:
          type: string
          enum:
            - verification_session
        url:
          type: string
          format: uri
          description: 供终端用户打开的托管验证 URL。
        session_id:
          type: string
          format: uuid
          description: 验证会话 ID。
        session_token:
          type: string
          description: 会话 token，移动端 SDK 用于原生启动流程。
        status:
          type: string
          description: 验证会话状态。
      required:
        - type
        - url
    TransactionWalletOwnershipAction:
      title: Wallet ownership
      type: object
      properties:
        type:
          type: string
          enum:
            - wallet_ownership
        url:
          type: string
          format: uri
          description: >-
            托管钱包所有权微件 URL。请在真实浏览器环境中打开：在移动端请使用 SFSafariViewController 或 Chrome
            Custom Tab，切勿使用嵌入式 webview。
        widget_session_id:
          type: string
          format: uuid
          description: 钱包所有权小部件会话 ID。
        expires_at:
          type: string
          format: date-time
          description: 小组件会话过期的时间。
      required:
        - type
        - url
    TravelRuleDataMatch:
      type: object
      nullable: true
      description: >-
        转账当事方数据与对方已知的钱包持有人信息之间的逐字段比对。该项仅指明字段和结果，绝不包含具体值，因此在交易对手数据被脱敏的同时仍保持可读性。在执行比对前为
        null。
      properties:
        matched:
          type: boolean
          description: 当比对的字段均无差异时为 true。
        mismatched_fields:
          type: array
          items:
            type: string
            enum:
              - name
              - date_of_birth
              - address
              - account
          description: 存在差异的字段。
        fields:
          type: object
          description: >-
            针对该参与方实体类型所比对的每个字段对应一个条目（`name`、`date_of_birth`、`address`、`account`；企业没有
            `date_of_birth`）。
          additionalProperties:
            type: object
            properties:
              result:
                type: string
                enum:
                  - matched
                  - mismatched
                  - not_compared
                description: 当规则为 `NONE` 或任一方该字段均无值时为 `not_compared`。
              strictness:
                type: string
                enum:
                  - NONE
                  - STRICT
                  - CONTAINS
                  - DEFAULT
                  - FUZZY
    TravelRuleDataUnmasked:
      type: object
      nullable: true
      description: 交易对手数据解除掩码时刻的审计记录。当数据仍处于掩码状态时以及出站转账时为 null。
      properties:
        at:
          type: string
          format: date-time
        reason:
          type: string
          enum:
            - ownership_confirmed
            - wallet_proof
            - address_book_match
            - own_verified_wallet
            - inquiry_approved
            - known_payment_method
            - travel_address
          description: >-
            确认股权结构的依据：ownership_confirmed（您通过控制台或 API
            进行的确认）、wallet_proof（小组件中的钱包证明，或在创建时设置的 INTERNAL
            入站转账）、address_book_match（已验证的地址簿钱包）、own_verified_wallet（您的用户本人的已验证钱包）、inquiry_approved（您对入站
            TRP 问讯或 GTR 或 Sygna 消息的批准）、known_payment_method（您的用户已用于付款的钱包）或
            travel_address（按钱包分配的 Travel Address 指定了该钱包）。
        actor:
          type: string
          description: 确认此项的主体：控制台用户的邮箱或 API 密钥的标签。自动决策时为空白。
    TravelRuleDelivery:
      type: object
      description: >-
        该转账应发送给对方的最新消息所处的状态。Didit
        会在创建或修改转账的请求返回后联系交易对手，因此该对象显示该消息是否成功送达：已排队（queued）、正在发送（being
        sent）、出错后等待重试（waiting to be retried after an
        error）、已投递（delivered）或已失败（failed）。网络仍可能恢复的故障（超时未响应、连接失败、HTTP `408`、`429`
        或 `5xx`）会在 30 秒、2 分钟、10 分钟、30 分钟和 1 小时后再次重试。当首条消息（`kind:
        SEND`）彻底失败（因为网络拒绝或第 6 次尝试也失败）时，转账状态将变为
        `COUNTERPARTY_VASP_NOT_REACHABLE`，并在其 `timeline` 中记录
        `last_error`；任何其他彻底失败的消息也会在 `timeline` 中标明。转账的 `status` 始终是交易本身的真实事实来源。
      required:
        - kind
        - status
        - rail
        - attempts
        - last_error
        - next_attempt_at
        - delivered_at
      properties:
        kind:
          type: string
          enum:
            - SEND
            - ANSWER
            - TXID
            - CANCEL
            - POLL
          description: >-
            该消息携带的内容。`SEND`：发送给交易对手的首条转账消息（出站；在发送时选择通道）。`ANSWER`：您对发起请求的网络做出的接受或拒绝（入站）。`TXID`：完成转账后的链上交易哈希。`CANCEL`：取消操作（在您取消转账之后）。`POLL`：向支持状态查询的网络发起的查询请求，在转账等待交易对手期间每
            5 分钟重复一次。
        status:
          type: string
          enum:
            - QUEUED
            - SENDING
            - RETRYING
            - DELIVERED
            - FAILED
          description: >-
            `QUEUED`：等待发送。`SENDING`：正在尝试发送。`RETRYING`：尝试失败，下一次尝试将在
            `next_attempt_at` 运行。`DELIVERED`：对方已接收消息。`FAILED`：对方拒绝接收，或最后一次尝试失败。
        rail:
          type: string
          enum:
            - INTERNAL
            - TRP
            - GTR
            - TRUST
            - VERIFYVASP
            - SYGNA
            - EMAIL
            - ''
          description: 承载该消息的通道。在 Didit 为第一条消息选定通道之前为空。
        attempts:
          type: integer
          minimum: 0
          description: 截至目前针对该消息进行的尝试次数。非状态轮询的消息最多尝试 6 次。
        last_error:
          type: string
          description: >-
            上次尝试遇到的失败类型，无失败时为 `""`：例如 `email undeliverable`、`trp identity
            endpoint unreachable` 或 `trp transfer inquiry delivery
            failed`。它从不包含交易对手自身的回复，后者保留在转账的 `timeline` 中。

            当 GTR 回复错误时，会包含其自身的状态码和消息。绝不包含响应体。
          example: email undeliverable
        next_attempt_at:
          type: string
          format: date-time
          nullable: true
          description: 当消息处于 `QUEUED` 或 `RETRYING` 状态时，下一次尝试运行的时间。
        delivered_at:
          type: string
          format: date-time
          nullable: true
          description: 对方接收消息的时间。
    TravelRuleDiscoveryStep:
      type: object
      description: Didit 为出站转账执行的交易对手发现中的一个步骤，按执行顺序排列。第一个指定了具有可用路由的 VASP 的步骤将终止链条。
      properties:
        step:
          type: string
          enum:
            - internal_address_book
            - wallet_attribution
            - network_lookup
            - customer_hint
            - end_user
          description: >-
            `internal_address_book`：已证明拥有目标钱包控制权的另一位 Didit
            客户。`wallet_attribution`：钱包的区块链分析归属。`network_lookup`：能够辨明持有该地址之 VASP
            的网络。`customer_hint`：您在 `beneficiary_data` 中发送的 VASP 名称、LEI
            或司法管辖区。`end_user`：终端用户（或您）选择的交易对手，或选择交易对手的请求。
        outcome:
          type: string
          enum:
            - match
            - miss
            - skipped
          description: '`match`：该步骤指明了交易对手。`miss`：已运行但未找到。`skipped`：无法运行，`reason` 说明了原因。'
        reason:
          type: string
          description: >-
            机器可读的原因，匹配时为
            `""`：`no_proven_internal_wallet`、`attribution_disabled`、`already_attributed`、`no_attributed_entity`、`directory_match_no_route`、`gtr_address_lookup_runs_on_dispatch`、`no_membership`、`network_switched_off`、`no_network_address_lookup`、`no_directory_match`、`awaiting_end_user`
            或 `picked_member_without_proven_wallet`。
        vasp:
          type: string
          format: uuid
          nullable: true
          description: 步骤中指定的目录 VASP（若有指定）。
        rail:
          type: string
          nullable: true
          description: 该步骤找到的、可触达该交易对手的通道。
        at:
          type: string
          format: date-time
    TravelRuleNextAction:
      type: object
      description: >-
        推动处于 `COUNTERPARTY_VASP_NOT_FOUND` 或 `COUNTERPARTY_VASP_NOT_REACHABLE`
        状态的转账继续进行的一项操作。请参阅[转账卡住的原因](/zh/transaction-monitoring/travel-rule#为什么转账会卡住)。
      properties:
        action:
          type: string
          enum:
            - select_counterparty_vasp
            - declare_self_hosted
            - add_vasp_hint
            - update_compliance_email
            - resend
          description: >-
            `select_counterparty_vasp`：终端用户在钱包所有权组件中选择目标 VASP，或者您通过 PATCH 传入
            `action=beneficiary_vasp`。`declare_self_hosted`：终端用户在组件中声明该钱包为自托管钱包。`add_vasp_hint`：通过
            VASP 名称、LEI 或 Travel Address（例如目标钱包地址簿条目上的 `travel_address`）告知 Didit
            交易对手是谁，然后重新发送。`update_compliance_email` 和 `resend` 是 `PATCH
            /v3/transactions/{transaction_id}/travel-rule/` 的 `action`
            取值：再次提供交易对手的合规邮箱，并重新运行路由。
        url:
          type: string
          format: uri
          description: >-
            钱包所有权小组件链接，当转账拥有开启的小组件会话时，出现在 `select_counterparty_vasp` 和
            `declare_self_hosted` 状态下。
      required:
        - action
    TravelRuleChainDetails:
      type: object
      description: >-
        当转账涉及的不止是一个地址向另一个地址付款时，该交易所在区块链对其两个钱包的命名方式。对于账户模型区块链上的转账（EVM、Solana、Tron），由于两个地址本身就是钱包，因此该字段为空（`{}`）。匹配、路由和地址簿会优先从此字段读取钱包信息。
      properties:
        chain:
          type: string
          description: 规范链，例如 `BTC`、`XRP`，或用于闪电网络转账的 `LIGHTNING`。
        shape:
          type: string
          enum:
            - utxo
            - memo
            - lightning
        originator:
          $ref: '#/components/schemas/TravelRuleChainSide'
        beneficiary:
          $ref: '#/components/schemas/TravelRuleChainSide'
        utxo:
          type: object
          description: 在 UTXO 转账中：存储的输入和输出（金额为十进制字符串）以及 Didit 将哪些输出读取为何种内容。
          properties:
            inputs:
              type: array
              items:
                $ref: '#/components/schemas/TravelRuleUtxoEntry'
            outputs:
              type: array
              items:
                $ref: '#/components/schemas/TravelRuleUtxoEntry'
            change_output_indexes:
              type: array
              items:
                type: integer
              description: 向输入地址回款的输出。
            beneficiary_output_index:
              type: integer
              nullable: true
              description: 向收款人付款的输出；若无法明确区分则为 null。
        lightning:
          type: object
          description: >-
            在 Lightning 转账中：付款请求的内容。始终包含
            `kind`（`bolt11`、`bolt12_offer`、`bolt12_invoice`、`bolt12_invoice_request`、`lnurl`、`lightning_address`、`node_id`
            或 `unknown`）；BOLT11 发票会附加
            `network`、`payee_node_id`、`payment_hash`、`amount_msat`、`created_at`
            和 `expires_at`；BOLT12 字符串附加 `blinded_paths` 和 `payee_node_id`；LNURL
            或 Lightning Address 附加其 `domain`。不会通过网络解析任何内容：仅对请求进行解码。
          additionalProperties: true
        warnings:
          type: array
          items:
            type: string
            enum:
              - declared_originator_not_an_input
              - declared_beneficiary_not_an_output
              - beneficiary_output_ambiguous
              - beneficiary_output_amount_differs
          description: >-
            值得关注的 UTXO
            不一致性：声明的汇款人不是输入、声明的收款人不是输出、无法区分出单一的收款人输出，或收款人输出支付的金额与交易声明的不一致。
        not_applicable_reason:
          type: string
          enum:
            - LIGHTNING_NO_PAYEE_IDENTIFIER
            - LIGHTNING_BOLT12_BLINDED_PAYEE
            - LIGHTNING_LNURL_NAMES_NO_PAYEE
          description: >-
            在未指明收款人的出站 Lightning 转账中：转账为何为
            `NOT_APPLICABLE`。`LIGHTNING_NO_PAYEE_IDENTIFIER`（请求未指明收款人节点，或无法解码）、`LIGHTNING_BOLT12_BLINDED_PAYEE`（报价通过盲化路径隐藏了收款人）、`LIGHTNING_LNURL_NAMES_NO_PAYEE`（LNURL
            指明的是服务而非收款人）。相同的代码会打开转账的最后一条 `timeline` 条目。
    TravelRuleChainSide:
      type: object
      description: Didit 根据链上数据解析出的其中一方钱包。
      properties:
        address:
          type: string
          description: >-
            钱包。在 memo 网络上为经典地址（XRP X-address 会被拆分为其经典地址和标签）；在闪电网络上为收款人节点 ID
            或闪电网络地址。
        memo:
          type: string
          description: 作为钱包一部分的目标标签或 memo；无则为 `""`。
        source:
          type: string
          enum:
            - declared
            - x_address
            - largest_input
            - only_non_change_output
            - amount_match
            - invoice_payee
            - updated
          description: >-
            钱包来源：`declared`（您的请求）、`x_address`（从 XRP X-address
            拆分）、`largest_input`（贡献最大的 UTXO 输入地址）、`only_non_change_output`（唯一的非找零
            UTXO 输出）、`amount_match`（支付转账金额的那个 UTXO
            输出）、`invoice_payee`（闪电网络付款请求中指定的收款人）、`updated`（稍后通过 `action:
            update_originator_wallet` 设置）。
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        您的应用 API 密钥，可在 Business Console 的“开发者 -> API
        密钥”中获取。主密钥拥有完整访问权限。指定名称的密钥可设置作用域：针对每个资源设为无权限、只读或读写，限定于特定工作流或已通过的会话、限定于
        IP 地址列表，以及设置到期日期。401 表示密钥错误、已撤销或已过期；403 表示未发送密钥、密钥无权访问该资源或操作，或请求来自其 IP
        列表之外的地址；在会话路由上返回 404 表示该会话不在该密钥允许的工作流或状态范围内。没有媒体访问权限的密钥获取到的图片、视频和 PDF
        URL 将为 null；没有会话写入权限的密钥获取到的会话链接和 token 将为 null。请参阅
        https://docs.didit.me/console/api-keys。

````

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