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

# 匹配 Travel Rule 入账 API：配对消息

> 将等待汇款人数据的入账与来源 VASP 发送的 Travel Rule 消息配对，使该入账获取汇款人数据。由 Didit 提供。



匹配未匹配 Travel Rule 充值的 API 提示词
        将提示词复制到剪贴板



      
      

\<pre>

\`Pair an inbound deposit that still waits for originator data with the Travel Rule message the originating VASP sent for it.

Endpoint:
POST https://verification.didit.me/v3/travel-rule/unmatched/{transaction_uuid}/match/

Authentication:
Use the x-api-key header with my Didit API key. A scoped API key needs the transactions privilege.

Path parameter:
\- transaction_uuid - the transaction_id of the unmatched deposit, from GET /v3/travel-rule/unmatched/.

Request body (JSON, required):
\- transaction_id (UUID) - the transaction_id of the received Travel Rule message: a row with kind "message" from GET /v3/travel-rule/transfers/?kind=message. The transfer's own id is not found.

curl example:
curl -X POST "https://verification.didit.me/v3/travel-rule/unmatched/<DEPOSIT_TRANSACTION_ID>/match/" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"transaction_id": "<MESSAGE_TRANSACTION_ID>"}'

Response 200:
\- deposit - the deposit row after the match: it now carries the message's originator data, counterparty VASP and rail, and matched_transaction_id points to the message.
\- message - the message row, with matched_transaction_id pointing to the deposit.

Failure modes:
\- 400 - transaction_id is missing, is the deposit itself, is not a received Travel Rule message, or is for a different asset than the deposit; or the transaction in the path is not an inbound deposit.
\- 401 - invalid API key.
\- 403 - the key lacks the transactions privilege.
\- 404 - the deposit or the message does not exist or was deleted.
\- 409 - the deposit no longer waits for originator data, or the message is already matched to a deposit. Nothing changes.

Full guide: /transaction-monitoring/travel-rule.`

\</pre>



      
      

粘贴到

## 何时使用当某笔来自 [列出未匹配充值](https://docs.didit.me/zh/management-api/travel-rule/list-unmatched-deposits.md) 的充值已收到一条属于它的 Travel Rule 消息，而 Didit 没有自动将两者配对时，请使用此接口。
该充值会继承消息中的发起方数据、对手方 VASP 和通道，两笔转账都会在各自的时间线上记录这次匹配。## 请求```bash theme={null}
curl -X POST "https://verification.didit.me/v3/travel-rule/unmatched/DEPOSIT_TRANSACTION_ID/match/" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"transaction_id": "MESSAGE_TRANSACTION_ID"}'
```## 注意事项- 路径中的 `transaction_uuid` 指的是充值。请求体中的 `transaction_id` 指的是消息。
- 消息必须与充值的资产相同。
- 如果任一侧已经进入后续状态，调用将返回 `409`，且不会做任何更改。
- 在控制台中删除的交易，无论是哪一侧，都会返回 `404`。## 相关内容- [列出未匹配充值](https://docs.didit.me/zh/management-api/travel-rule/list-unmatched-deposits.md)
- [列出 Travel Rule 转账](https://docs.didit.me/zh/management-api/travel-rule/list-transfers.md)
- [Travel Rule](https://docs.didit.me/zh/transaction-monitoring/travel-rule.md)


## OpenAPI

````yaml zh/openapi-25.json POST /v3/travel-rule/unmatched/{transaction_uuid}/match/
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/travel-rule/unmatched/{transaction_uuid}/match/:
    post:
      tags:
        - Travel Rule
      summary: 将 Travel Rule 充值与接收到的消息进行匹配
      description: >-
        将仍等待汇款人数据的入账充值与汇款方 VASP 为其发送的 Travel Rule 消息进行配对。该充值将采用该消息的汇款人数据、交易对手
        VASP 和通道，且两笔转账均会在其时间线上记录该匹配。`transaction_uuid` 是来自 `GET
        /v3/travel-rule/unmatched/` 的充值 `transaction_id`。请求体中的 `transaction_id`
        是接收到消息的 `transaction_id`，来自 `GET
        /v3/travel-rule/transfers/?kind=message` 的某一行；该转账自身的 `id`
        未找到。该消息必须与充值针对相同的资产。从 Console 中删除的充值或消息将返回
        `404`；已继续推进（已匹配或不再等待）的充值或消息将返回 `409`。
      operationId: matchUnmatchedTravelRuleDeposit
      parameters:
        - name: transaction_uuid
          in: path
          required: true
          description: 未匹配充值的 `transaction_id`。
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TravelRuleManualMatchRequest'
            example:
              transaction_id: e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24
      responses:
        '200':
          description: 匹配后的两笔转账。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TravelRuleManualMatchResponse'
              example:
                deposit:
                  id: 7d3a1c55-0b9e-4d52-8a3c-1f6e2b9d4a08
                  transaction_id: c41f9b2e-5a8d-4e0c-9f17-3b6d8a2e5c91
                  txn_id: dep-2026-10-20-0007
                  txn_date: '2026-10-19T08:41:12Z'
                  kind: deposit
                  direction: INBOUND
                  status: AWAITING_COUNTERPARTY
                  rail: TRP
                  asset: ETH
                  amount: '1.25'
                  originator_vasp: Example Counterparty VASP
                  beneficiary_vasp: Example Counterparty VASP
                  originator_wallet: '0x77ccff0cc624a53cd8b8d8703ced826710211ec7'
                  beneficiary_wallet: '0xede2d7e4f5b097e6391ab6bbcf2f47a53f4778cb'
                  originator_memo: ''
                  beneficiary_memo: ''
                  originator_wallet_type: vasp
                  beneficiary_wallet_type: vasp
                  matched_transaction_id: e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24
                  deadline_at: null
                  created_at: '2026-10-19T08:41:13Z'
                message:
                  id: 2b8e6f10-9c3a-47d1-b5e2-0a4c7d9f3e66
                  transaction_id: e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24
                  txn_id: msg-2026-10-20-0003
                  txn_date: '2026-10-19T08:41:12Z'
                  kind: message
                  direction: INBOUND
                  status: COMPLETED
                  rail: TRP
                  asset: ETH
                  amount: '1.25'
                  originator_vasp: Origin CASP SL
                  beneficiary_vasp: Example Counterparty VASP
                  originator_wallet: '0x77ccff0cc624a53cd8b8d8703ced826710211ec7'
                  beneficiary_wallet: '0xede2d7e4f5b097e6391ab6bbcf2f47a53f4778cb'
                  originator_memo: ''
                  beneficiary_memo: ''
                  originator_wallet_type: vasp
                  beneficiary_wallet_type: vasp
                  matched_transaction_id: null
                  deadline_at: '2026-10-21T08:41:13Z'
                  created_at: '2026-10-19T08:41:13Z'
        '400':
          description: >-
            验证错误：`transaction_id` 缺失、为充值交易本身、不是已接收的 Travel Rule
            消息，或者对应的资产与充值资产不同；或者路径中的交易不是入站充值。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Error:
                  value:
                    transaction_id:
                      - >-
                        The travel rule message is for a different asset than
                        the deposit.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: 未知的存款或消息，或者其中之一已被删除。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              example:
                detail: No TravelRuleTransfer matches the given query.
        '409':
          description: 充值不再等待汇款人数据，或者消息已与充值匹配。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Error:
                  value:
                    detail: This deposit is no longer waiting for originator data.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.travel_rule.unmatched_deposits.match(
                "11111111-2222-3333-4444-555555555555",
                transaction_id="e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24",
            )
            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.travelRule.unmatchedDeposits.match("11111111-2222-3333-4444-555555555555",
            {
              transaction_id: "e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24",
            });

            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.UnmatchedDeposits.Match(ctx, \"11111111-2222-3333-4444-555555555555\", didit.TravelRuleManualMatchRequest{\n\tTransactionID: \"e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24\",\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.TravelRuleManualMatchRequest;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.travelRule().unmatchedDeposits().match("11111111-2222-3333-4444-555555555555",
            TravelRuleManualMatchRequest.builder()
                    .transactionId("e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24")
                    .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->travelRule->unmatchedDeposits->match('11111111-2222-3333-4444-555555555555',
            [
                'transaction_id' => 'e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24',
            ]);

            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

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

            result = didit.travel_rule.unmatched_deposits.match(
              "11111111-2222-3333-4444-555555555555",
              transaction_id: "e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24"
            )
            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.TravelRule.UnmatchedDeposits.MatchAsync("11111111-2222-3333-4444-555555555555",
            new TravelRuleManualMatchRequest

            {
                TransactionId = "e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24",
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    TravelRuleManualMatchRequest:
      type: object
      required:
        - transaction_id
      properties:
        transaction_id:
          type: string
          format: uuid
          description: '收到的 Travel Rule 消息的 `transaction_id`（`kind: message` 的行）。'
    TravelRuleManualMatchResponse:
      type: object
      required:
        - deposit
        - message
      properties:
        deposit:
          $ref: '#/components/schemas/TravelRuleTransferRow'
        message:
          $ref: '#/components/schemas/TravelRuleTransferRow'
    TravelRuleTransferRow:
      type: object
      description: 转账列表中显示的一笔 Travel Rule 转账：仅包含 VASP 名称、钱包和备注，绝不包含汇款人或收款人的个人数据。
      properties:
        id:
          type: string
          format: uuid
          description: 转账的 id。
        transaction_id:
          type: string
          format: uuid
          description: 此转账所属的 Didit 交易。
        txn_id:
          type: string
          nullable: true
          description: 您为该交易指定的自身 ID。Didit 为您登记的转账（例如 Didit Test VASP 入账转账）将带有生成的 ID。
        txn_date:
          type: string
          format: date-time
        kind:
          type: string
          enum:
            - withdrawal
            - deposit
            - message
          description: >-
            withdrawal：出账。message：通道根据交易对手的消息创建的入账转账（TRP 查询、INTERNAL 入账分支，或
            GTR、VerifyVASP 或 Sygna Bridge 消息）。deposit：任何其他入账转账。
        direction:
          type: string
          enum:
            - INBOUND
            - OUTBOUND
        status:
          type: string
          enum:
            - AWAITING_COUNTERPARTY
            - ON_HOLD
            - COMPLETED
            - FINISHED
            - CANCELLED
            - EXPIRED
            - COUNTERPARTY_MISMATCHED_DATA
            - COUNTERPARTY_VASP_NOT_FOUND
            - COUNTERPARTY_VASP_NOT_REACHABLE
            - UNCONFIRMED_OWNERSHIP
            - COUNTERPARTY_VASP_GENERAL_DECLINE
            - NOT_ENOUGH_COUNTERPARTY_DATA
            - NOT_APPLICABLE
        reason:
          type: string
          description: >-
            `COUNTERPARTY_VASP_NOT_FOUND` 或 `COUNTERPARTY_VASP_NOT_REACHABLE`
            转账受阻的原因，取值与转账自身的 `reason`
            相同，因此列表无需逐一打开每笔转账即可区分合规邮件退信与无路由的交易对手。任何其他状态下为
            `""`。参见[转账受阻的原因](/zh/transaction-monitoring/travel-rule#为什么转账会卡住)。
        rail:
          type: string
          nullable: true
          enum:
            - INTERNAL
            - TRP
            - GTR
            - TRUST
            - VERIFYVASP
            - SYGNA
            - EMAIL
            - TEST_VASP
            - null
        asset:
          type: string
          description: 交易的币种。
        amount:
          type: string
          description: 普通小数形式的金额，例如 "1.25"。
        originator_vasp:
          type: string
          description: >-
            出向：您 VASP 的法定名称。入向：交易对手的名称，来自其目录条目、Didit 网络成员、TRP 发送方、Didit Test
            VASP 或转账声明的名称。未知时为空。
        beneficiary_vasp:
          type: string
          description: 出向：以相同方式计算得出的交易对手名称。入向：您 VASP 的法定名称。
        originator_wallet:
          type: string
        beneficiary_wallet:
          type: string
        originator_memo:
          type: string
          description: Memo 或目标标签，在没有该项的链上为空。
        beneficiary_memo:
          type: string
        originator_wallet_type:
          type: string
          enum:
            - vasp
            - self_hosted
            - own
          description: vasp、self_hosted（声明为非托管）或 own（您的地址簿中记录为属于您的钱包）。您自己的一方始终为 vasp。
        beneficiary_wallet_type:
          type: string
          enum:
            - vasp
            - self_hosted
            - own
        matched_transaction_id:
          type: string
          format: uuid
          nullable: true
          description: 您手动与已声明转账相匹配的充值交易另一方。
        deadline_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            如果转账仍在等待其交易对手，该转账过期的时间。针对您使用 `POST /v3/transactions/`
            创建且需要进行交换的出账或入账的每一笔转账进行设置。低于阈值、不适用 Travel Rule 的闪电网络支付，以及交易对手联系到您时
            Didit 创建的入账转账（入账 TRP 问询、网络消息或 INTERNAL 入账环节）时为 null。
        created_at:
          type: string
          format: date-time
  responses:
    Unauthorized:
      description: 未授权
      content:
        application/json:
          examples:
            Invalid API Key:
              summary: 无效的 API 密钥
              value:
                detail: Invalid API Key.
    Forbidden:
      description: 禁止访问
      content:
        application/json:
          examples:
            No Permission:
              summary: 无权限
              value:
                detail: You do not have permission to perform this action.
            Not Enough Credits:
              summary: 额度不足
              value:
                error: >-
                  You don't have enough credits to perform this request. Please
                  top up at https://business.didit.me
  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.