> ## 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：完了・再送・更新

> DiditのManagement APIで、トラベルルール送金をオンチェーンのハッシュで完了処理し、キャンセルや再送を行い、資金が実際に送金されたウォレットを記録できます。



トラベルルール送金アクションAPIのプロンプト
        プロンプトをクリップボードにコピー



      
      

\<pre>

\`Act on an existing Travel Rule transfer: report the on-chain hash to finish it, cancel it, re-run counterparty routing, replace a refused compliance email, or record the wallet the funds left from.

Endpoint:
PATCH https://verification.didit.me/v3/transactions/{transaction_id}/travel-rule/

Authentication:
Use the x-api-key header with my Didit API key. {transaction_id} is the Didit transaction uuid.

Four mutually exclusive bodies:

1\. Finish (close out after broadcasting on-chain):
\{"payment_txn_id": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060"}
\- Requires an OUTBOUND transfer in COMPLETED status - otherwise 409.
\- Moves the transfer (and its INTERNAL-rail counterpart, if any) to FINISHED and stores the hash on the transaction.
\- Over GTR, VerifyVASP or Sygna Bridge, the network learns the hash after the response, with retries (see delivery below).
\- On the TRP rail, Didit also posts the hash to the counterparty's confirmation callback.

2\. Cancel:
\{"action": "cancel"}
\- Allowed from any non-terminal status; moves the transfer (and its INTERNAL-rail counterpart, if any) to CANCELLED.
\- From a terminal status (FINISHED, CANCELLED, EXPIRED) it returns 409.
\- On an outbound TRP transfer, Didit also sends a cancellation to the counterparty.
\- Over GTR, VerifyVASP or Sygna Bridge, the network is told after the response, with retries.

3\. Resend (re-run the routing ladder):
\{"action": "resend"}
\- Allowed only on an OUTBOUND transfer in COUNTERPARTY_VASP_NOT_FOUND, COUNTERPARTY_VASP_NOT_REACHABLE, or NOT_ENOUGH_COUNTERPARTY_DATA - otherwise 409.
\- Resets the deadline and re-runs routing; a transfer whose destination wallet was declared unhosted moves to UNCONFIRMED_OWNERSHIP.
\- First give Didit a route, for example by registering the destination wallet in your address book (same chain as the transfer, or a blank chain) with the counterparty's travel_address (TRP carries BTC, ETH, and USDC on a named network), or by adding a compliance contact for the counterparty's directory entry with POST /v3/travel-rule/counterparty-contacts/, then resend.
\- Resend reuses the transfer's beneficiary_data, which you cannot change after creation except for the compliance email (body 4), so submit a new transaction to send different beneficiary data.
\- A previously recorded blockchain-analytics attribution is reused - no new lookup, no new charge.
\- Discovery runs again from the first step (internal address book, wallet attribution, network lookup, your VASP hint, then the end user); the transfer's "discovery" list shows what each step found.
\- Queued, not run inside the request: the response shows the transfer back in AWAITING_COUNTERPARTY with a "resend queued" timeline entry, and the outcome arrives as a travel_rule.status.updated webhook. A resend sent while an earlier attempt is still running is sent once that attempt settles.
\- If routing still resolves nothing, the transfer lands back in COUNTERPARTY_VASP_NOT_FOUND.

4\. Update the compliance email (the fix for reason email_undeliverable):
\{"action": "update_compliance_email", "compliance_email": "desk@bene-casp.example"}
\- Allowed only on an OUTBOUND transfer in COUNTERPARTY_VASP_NOT_FOUND, COUNTERPARTY_VASP_NOT_REACHABLE, or NOT_ENOUGH_COUNTERPARTY_DATA - otherwise 409.
\- A missing or malformed compliance_email returns 400.
\- Stores the address as this transfer's beneficiary_data.counterparty_vasp_email; it belongs to this transfer only and joins no directory entry or contact list.
\- The status does not change and the timeline gains "compliance email updated". The transfer keeps reason email_undeliverable until you send {"action": "resend"}, which sends the request to the new address.

4\. Update the originator wallet (the wallet the funds actually left from):
\{"action": "update_originator_wallet", "wallet_address": "bc1q...", "memo": ""}
\- Outbound transfers only (an inbound transfer -> 409), and never a CANCELLED or EXPIRED one (-> 409).
\- Use it when a withdrawal is broadcast from another address than the one declared, typically a UTXO withdrawal spending whichever addresses held the coins. When the transfer's UTXO inputs are known, wallet_address must be one of them (-> 400 otherwise).
\- Changes the record only: nothing is sent to the counterparty again and the status stays. chain_details.originator becomes the new wallet with source "updated", the timeline records the previous and the new wallet, and the INTERNAL-rail counterpart is updated the same way.

5\. Name the counterparty (when discovery could not):
\{"action": "beneficiary_vasp", "beneficiary_vasp": "<directory VASP id>"}
\- The id comes from GET /v3/travel-rule/vasps/.
\- Allowed only for an outbound transfer in COUNTERPARTY_VASP_NOT_FOUND, COUNTERPARTY_VASP_NOT_REACHABLE, or NOT_ENOUGH_COUNTERPARTY_DATA - otherwise 409.
\- Routes the transfer to that VASP and sends it again; automatic discovery never overrides your choice.
\- 400 if beneficiary_vasp is missing or not a valid id, 404 if no directory entry has that id.

What to read from the response:
\- The full transfer object: status, rail, direction, ownership_confirmed, deadline_at, timeline, counterparty_vasp, delivery, discovery, reason, next_actions.
\- delivery: the latest message the transfer owes the other side - kind (SEND, ANSWER, TXID, CANCEL, POLL), status (QUEUED, SENDING, RETRYING, DELIVERED, FAILED), rail, attempts, last_error, next_attempt_at, delivered_at. Failures a network may recover from are retried after 30 s, 2, 10, 30 and 60 minutes; when a first message fails for good the transfer moves to COUNTERPARTY_VASP_NOT_REACHABLE. null when the transfer never owed a message.
\- reason and next_actions say why a COUNTERPARTY_VASP_NOT_FOUND or COUNTERPARTY_VASP_NOT_REACHABLE transfer is stuck and what moves it on: email_undeliverable offers update_compliance_email then resend, delivery_failed offers resend, and a discovery reason offers select_counterparty_vasp, declare_self_hosted, add_vasp_hint and resend. Both are empty for any other status, so they clear once a resend moves the transfer on.

Order of operations for outbound transfers:
submit transaction -> wait for travel_rule.status == "COMPLETED" -> broadcast on-chain -> PATCH with payment_txn_id -> FINISHED.
Never broadcast before COMPLETED.
A transfer sent over TRUST cannot reach COMPLETED, because TRUST sends back nothing Didit can read; it stays AWAITING_COUNTERPARTY until it expires. Over GTR, VerifyVASP and Sygna Bridge, Didit reads the counterparty's answer from the network.
If the message cannot be delivered, the transfer moves to COUNTERPARTY_VASP_NOT_REACHABLE instead.

Failure modes:
\- 400 - the body has none of payment_txn_id or a supported action, update_compliance_email has a missing or malformed compliance_email, or a wallet_address or memo the transfer's chain cannot carry.
\- 409 - action not allowed from the transfer's current status or direction (see the per-action rules above).
\- 400 - action=beneficiary_vasp without a valid beneficiary_vasp.
\- 404 - unknown transaction, no Travel Rule transfer attached, or (action=beneficiary_vasp) no directory entry has that id.

Full guide: /transaction-monitoring/travel-rule#sending-a-transfer and /transaction-monitoring/travel-rule#why-a-transfer-is-stuck.`

\</pre>



      
      

貼り付け先



## OpenAPI

````yaml ja/openapi-25.json PATCH /v3/transactions/{transaction_id}/travel-rule/
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/{transaction_id}/travel-rule/:
    patch:
      tags:
        - Travel Rule
      summary: トラベルルール送金の完了、キャンセル、再送、または送金人ウォレットの更新
      description: >-
        `payment_txn_id`を指定すると、オンチェーンハッシュを報告し、送信側のCOMPLETEDの送金をFINISHEDに移行します(INTERNALレール側の対応する送金もFINISHEDに移行します)。`{"action":
        "cancel"}`を指定すると、終了状態でない送金をキャンセルします。`{"action":
        "resend"}`を指定すると、COUNTERPARTY_VASP_NOT_FOUND、COUNTERPARTY_VASP_NOT_REACHABLE、またはNOT_ENOUGH_COUNTERPARTY_DATAで止まっている送信側の送金を再度ルーティングします(先に取引相手のデータを改善してください。例:送金先ウォレットのエントリにtravel_addressを追加する)。resendは送信側の送金にのみ適用されます。`{"action":
        "update_compliance_email", "compliance_email":
        "desk@example.com"}`は、これら3つのステータスのいずれかにある送信側の送金のコンプライアンス用メールアドレスを置き換えます。これは`reason:
        email_undeliverable`への対処方法です。ステータスは変わらず、次の`resend`でリクエストがそのアドレスに送信されます。再送はキューに追加され、リクエスト内では実行されません。レスポンスでは、送金がAWAITING_COUNTERPARTYに戻り、`resend
        queued`のタイムラインエントリとキューに追加された`delivery`が表示されます。送信先がどこになったかは`travel_rule.status.updated`のWebhookで通知されます。送金がGTR、VerifyVASP、またはSygna
        Bridgeを経由した場合、ネットワークはレスポンスの後に、再試行を伴ってオンチェーンハッシュまたはキャンセルを受け取ります。`delivery`はそのメッセージの状況を示します。`{"action":
        "update_originator_wallet", "wallet_address":
        "..."}`は、送信側の送金について、資金が実際に送出されたウォレットを記録します。たとえば、申告したメインウォレットではなく、UTXOの出金がブロードキャストされたアドレスです。変更されるのは記録のみです。取引相手には何も再送されず、ステータスも変わりません。送金人は`source:
        updated`を伴う`chain_details.originator`となり、変更内容は以前のウォレットと新しいウォレットとともに`timeline`に追加されます。送金のINTERNALレール側の対応する送金も同様に更新されます。`{"action":
        "beneficiary_vasp", "beneficiary_vasp": "<directory VASP
        id>"}`は、COUNTERPARTY_VASP_NOT_FOUND、COUNTERPARTY_VASP_NOT_REACHABLE、またはNOT_ENOUGH_COUNTERPARTY_DATAにある送信側の送金について、ディスカバリーで特定できなかった取引相手をご自身で指定します。送金はそのVASPにルーティングされ、再送されます。
      operationId: patchTravelRuleTransfer
      parameters:
        - name: transaction_id
          in: path
          required: true
          description: この送金を所有する取引の、Diditの安定したUUIDです。
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TravelRuleTransferPatchRequest'
            examples:
              Finish:
                value:
                  payment_txn_id: 0xchainhash
              Cancel:
                value:
                  action: cancel
              Resend:
                value:
                  action: resend
              Update compliance email:
                value:
                  action: update_compliance_email
                  compliance_email: desk@example.com
              Update originator wallet:
                value:
                  action: update_originator_wallet
                  wallet_address: bc1qOriginatorInputAddress01
              Name the counterparty:
                value:
                  action: beneficiary_vasp
                  beneficiary_vasp: 9f1c2b34-5d6e-4f70-8a91-b2c3d4e5f607
      responses:
        '200':
          description: >-
            更新された送金。`update_compliance_email`の後もステータスは変わらず、次の`resend`まで`reason:
            email_undeliverable`が保持されます。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TravelRuleTransferDetail'
        '400':
          description: >-
            payment_txn_idとサポートされているアクションのどちらも指定されていない、`update_compliance_email`で`compliance_email`がないかメールアドレスではない、または`update_originator_wallet`で、wallet_addressがない、送金のチェーンで扱えないウォレットまたはメモが指定された、送金のUTXO入力に含まれないウォレットが指定された、あるいは`beneficiary_vasp`がないか有効なディレクトリのVASP
            IDではない場合です。
          content:
            application/json:
              examples:
                No action:
                  value:
                    detail:
                      - >-
                        Provide payment_txn_id, action=cancel, action=resend,
                        action=beneficiary_vasp, action=update_originator_wallet
                        or action=update_compliance_email.
                Invalid compliance email:
                  value:
                    compliance_email:
                      - Enter a valid email address.
        '404':
          description: >-
            不明な取引、取引にトラベルルールの送金がない、または（アクション`beneficiary_vasp`の場合）そのIDのディレクトリエントリがありません。
        '409':
          description: >-
            送金がこの操作を許可する状態にありません（例:
            finishではCOMPLETEDまたはアウトバウンドでない、cancelではすでに終了状態にある、resendでは再送可能なステータスのアウトバウンド送金でない）。`update_compliance_email`は、インバウンド送金、およびCOUNTERPARTY_VASP_NOT_FOUND、COUNTERPARTY_VASP_NOT_REACHABLE、NOT_ENOUGH_COUNTERPARTY_DATA以外の状態にあるアウトバウンド送金に対して`409`を返します。`update_originator_wallet`は、インバウンド、キャンセル済み、または期限切れの送金に対して`409`を返します。`beneficiary_vasp`は、送金がアウトバウンドで、かつCOUNTERPARTY_VASP_NOT_FOUND、COUNTERPARTY_VASP_NOT_REACHABLE、NOT_ENOUGH_COUNTERPARTY_DATAのいずれかの状態にある場合を除き、`409`を返します。
          content:
            application/json:
              examples:
                Cancel from a terminal status:
                  value:
                    detail: Transfer is already in a terminal state.
                Resend not allowed:
                  value:
                    detail: Transfer cannot be resent from its current state.
                Finish not allowed:
                  value:
                    detail: >-
                      Transfer must be an outbound transfer in COMPLETED status
                      to finish.
                Compliance email cannot change:
                  value:
                    detail: >-
                      The compliance email of this transfer cannot change from
                      its current state.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X PATCH
            https://verification.didit.me/v3/transactions/{transaction_id}/travel-rule/
            \
              -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \
              -d '{"payment_txn_id": "0xchainhash"}'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.transactions.travel_rule.update_transfer(
                "11111111-2222-3333-4444-555555555555",
                payment_txn_id="0xchainhash",
            )
            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.travelRule.updateTransfer("11111111-2222-3333-4444-555555555555",
            {
              payment_txn_id: "0xchainhash",
            });

            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.TravelRule.UpdateTransfer(ctx, \"11111111-2222-3333-4444-555555555555\", didit.TravelRuleTransferPatchRequest{\n\tPaymentTxnID: didit.String(\"0xchainhash\"),\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.TravelRuleTransferPatchRequest;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.transactions().travelRule().updateTransfer("11111111-2222-3333-4444-555555555555",
            TravelRuleTransferPatchRequest.builder()
                    .paymentTxnId("0xchainhash")
                    .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->travelRule->updateTransfer('11111111-2222-3333-4444-555555555555',
            [
                'payment_txn_id' => '0xchainhash',
            ]);

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

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

            result = didit.transactions.travel_rule.update_transfer(
              "11111111-2222-3333-4444-555555555555",
              payment_txn_id: "0xchainhash"
            )
            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.TravelRule.UpdateTransferAsync("11111111-2222-3333-4444-555555555555",
            new TravelRuleTransferPatchRequest

            {
                PaymentTxnId = "0xchainhash",
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    TravelRuleTransferPatchRequest:
      type: object
      description: >-
        次のいずれか1つだけを指定してください:payment_txn_id(完了)、action=cancel、action=resend、compliance_emailを伴うaction=update_compliance_email、wallet_addressを伴うaction=update_originator_wallet、またはbeneficiary_vaspを伴うaction=beneficiary_vasp。
      properties:
        payment_txn_id:
          type: string
          description: オンチェーンの取引ハッシュ。送金が出金であり、ステータスがCOMPLETEDである必要があります。
        action:
          type: string
          enum:
            - cancel
            - resend
            - update_compliance_email
            - update_originator_wallet
            - beneficiary_vasp
          description: >-
            "cancel"は、終了状態にない移転をキャンセルします。"resend"は、COUNTERPARTY_VASP_NOT_FOUND、COUNTERPARTY_VASP_NOT_REACHABLE、またはNOT_ENOUGH_COUNTERPARTY_DATAで停止している送信側の移転について、ルーティングを再実行します。"update_compliance_email"は、これら3つのステータスのいずれかにある送信側の移転について、リクエストの送信先となるコンプライアンス用メールアドレスを置き換えます。その後に"resend"を送信してください。"update_originator_wallet"は、資金が実際に送り出されたウォレット（`wallet_address`、`memo`）を記録します。"beneficiary_vasp"は、これらのステータスのいずれかにある送信側の移転について、取引相手のVASPを自分で指定します（`beneficiary_vasp`が必要です）。移転はそのVASPにルーティングされ、再送信されます。
        compliance_email:
          type: string
          format: email
          maxLength: 254
          description: >-
            `action:
            update_compliance_email`の場合は必須です。この送金の`beneficiary_data.counterparty_vasp_email`として保存されます。この値はこの送金にのみ属し、ディレクトリのエントリや連絡先リストには追加されません。
        wallet_address:
          type: string
          maxLength: 128
          description: >-
            `action:
            update_originator_wallet`の場合：資金の送金元ウォレット。送金のUTXOインプットが判明している場合は、そのいずれかである必要があります。
        memo:
          type: string
          maxLength: 256
          description: >-
            `action:
            update_originator_wallet`の場合：メモ対応ネットワークにおけるウォレットのメモまたはタグ。任意です。
        beneficiary_vasp:
          type: string
          format: uuid
          description: >-
            action=beneficiary_vaspの場合は必須です。`GET
            /v3/travel-rule/vasps/`で取得したディレクトリVASPの`id`を指定します。指定した値はすべての自動検出ステップより優先され、自動検出によって上書きされることはありません。
    TravelRuleTransferDetail:
      type: object
      description: >-
        所有権確認エンドポイントおよび完了/キャンセルエンドポイントから返される完全な送金オブジェクト。受信送金のウォレット所有権が未確認の間、取引相手の`originator_data`と`beneficiary_data`はマスクされた状態で返され（各単語の最初の文字のみが残り、ウォレット、チェーン、VASPのルーティング情報は判読可能なままです）、`data_masked`はtrueになります。
      properties:
        uuid:
          type: string
          format: uuid
        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
        direction:
          type: string
          enum:
            - INBOUND
            - OUTBOUND
        rail:
          type: string
          nullable: true
          enum:
            - INTERNAL
            - TRP
            - GTR
            - TRUST
            - VERIFYVASP
            - SYGNA
            - EMAIL
            - TEST_VASP
            - null
          description: >-
            送金のルーティングに使われたレール。レールが選択されなかった場合はnullです（例:
            しきい値未満、取引相手のウォレットがセルフホスト型ウォレット、入金後の登録、到達可能な取引相手がいない場合）。INTERNALは双方がDiditのアプリケーションであることを意味し、EMAILはメールで送信された受け取りリンクで取引相手に到達したことを意味します。TEST_VASPは、Didit
            Test
            VASPがサンドボックスの送金に応答したことを意味します。GTR、VERIFYVASP、SYGNAでは、Diditはネットワークのレスポンスから、または5分ごとのポーリングによって取引相手の回答を読み取ります。TRUSTは送信のみのため、TRUSTの送金は期限切れになるまでAWAITING_COUNTERPARTYのままです。ネットワークのレールは、そのネットワークについてお客様自身のメンバーシップを接続している場合にのみ使用されます。レールは取引作成のレスポンスが返された後に選択されるため、そのレスポンスではnullです。
        protocol:
          type: string
          nullable: true
        ivms_version:
          type: string
          example: ivms101.2023
        required:
          type: boolean
        ownership_confirmed:
          type: boolean
          nullable: true
        deadline_at:
          type: string
          format: date-time
          nullable: true
        timeline:
          type: array
          items:
            type: object
            properties:
              status:
                type: string
              at:
                type: string
                format: date-time
              detail:
                type: string
              name_match:
                allOf:
                  - $ref: '#/components/schemas/TravelRuleNameMatch'
                nullable: true
                description: このエントリが判定した氏名比較で、`detail`と並んで返されます。氏名を比較しなかったエントリには含まれません。
              reason:
                type: string
                description: >-
                  配信の失敗によって発生した遷移のエントリにのみ含まれます。値は`email_undeliverable`または`delivery_failed`で、送金の`reason`が報告する値と同じです。
        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）ごとに1つのオブジェクトがあり、それぞれ{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。
        originator_data:
          type: object
          description: 送金人当事者です。受信する送金の場合、取引相手の値は所有権が確認されるまでマスクされます。
        beneficiary_data:
          type: object
          description: 受取人の当事者情報。受信側の送金では、所有権が確認されるまで取引相手の値はマスクされます。
        name_match:
          allOf:
            - $ref: '#/components/schemas/TravelRuleNameMatch'
          nullable: true
          description: >-
            送金の判定を決めた氏名比較です。比較が実行されるまではnullです。当事者がマスクされている間、およびINTERNALのやり取りにおける相手顧客側のコピーでは、`transfer_name`、`compared_name`、`matched_names`、`mismatched_names`は非表示になります。`score`と`matched`は一致しない場合があります。`matched`は厳格度に従い、`score`は2つの氏名全体の類似度を表します。
        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です。
        created_at:
          type: string
          format: date-time
        delivery:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/TravelRuleDelivery'
          description: >-
            この移転が相手側に送るべき最新メッセージの状況です。移転が一度もメッセージを送る必要がなかった場合（例：`threshold_amount`未満、申告済みのセルフホスト型ウォレット、サンライズ登録）はnullです。
        discovery:
          type: array
          description: >-
            Diditが取引相手をどのように探索したかを示します。実行されたステップごとに1エントリです。受信送金など、探索が実行されなかった場合は空です。
          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`のIDホストが応答しなかった、または取引相手の`TRP`ホストが照会を受け付けなかった）。それ以外の場合は`discovery`トレースが理由を決定します：`awaiting_end_user`（Diditが到達できる取引相手を指定したステップがない）、`directory_match_no_route`（ステップが経路のないディレクトリ上のVASPを指定した）、`picked_member_without_proven_wallet`（エンドユーザーが、ウォレットの管理を証明していないDiditの顧客を選択した）、またはトレースが他の理由を示さない場合は`no_directory_match`です。再送すると送金が先に進むため、理由はクリアされます。[送金が停止する理由](/ja/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'
    TravelRuleNameMatch:
      type: object
      nullable: true
      description: >-
        送金の判定を決めた氏名比較です。比較が実行されるまではnullです。当事者がマスクされている間、およびINTERNALのやり取りにおける相手顧客側のコピーでは、`transfer_name`、`compared_name`、`matched_names`、`mismatched_names`は非表示になります。`score`と`matched`は一致しない場合があります。`matched`は厳格度に従い、`score`は2つの氏名全体の類似度を表します。
      properties:
        score:
          type: integer
          minimum: 0
          maximum: 100
          description: 2つの氏名の類似度(0〜100)。いずれかの氏名が空の場合は0です。
        matched:
          type: boolean
          description: >-
            名前が`strictness`を満たすかどうか。送金の結果はすべてのフィールドを比較する`data_match`に従うため、この値がtrueであっても送金がCOUNTERPARTY_MISMATCHED_DATAになる場合があります。
        method:
          type: string
          enum:
            - none
            - exact_token
            - token_subset
            - token_containment
            - sequence_ratio
          description: >-
            `matched`の判定方法です。none(`NONE`)、exact_token(`STRICT`)、token_subset(`DEFAULT`)、token_containment(`CONTAINS`)、sequence_ratio(`FUZZY`)のいずれかです。
        strictness:
          type: string
          enum:
            - NONE
            - STRICT
            - CONTAINS
            - DEFAULT
            - FUZZY
        compared_with:
          type: string
          enum:
            - wallet_holder
            - counterparty_vasp
          description: >-
            wallet_holder: ウォレットに記録されている保有者。counterparty_vasp:
            取引相手がメールのレスポンスページで回答した名称、またはサンドボックスではDidit Test VASPの回答。
        transfer_name:
          type: string
          description: 送金に記載された名前です。
        compared_name:
          type: string
          description: 比較対象となった名前です。
        matched_names:
          type: array
          items:
            type: string
          description: '`compared_name`に含まれる`transfer_name`の単語。'
        mismatched_names:
          type: array
          items:
            type: string
          description: >-
            `compared_name`にない`transfer_name`の単語、続いて`transfer_name`にない`compared_name`の単語。
    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: >-
            当事者のエンティティ種別について比較されたフィールドごとに1エントリー（`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（ウォレットごとのトラベルアドレスがそのウォレットを指定したこと）のいずれかです。
        actor:
          type: string
          description: 確認した主体：コンソールユーザーのメールアドレス、またはAPIキーのラベル。自動判定の場合は空欄です。
    TravelRuleDelivery:
      type: object
      description: >-
        移転が相手側に送るべき最新メッセージの状況です。Diditは、移転を作成または変更したリクエストがレスポンスを返した後に取引相手に連絡するため、このオブジェクトはそのメッセージが届いたかどうかを示します。キュー待ち、送信中、エラー後の再試行待ち、配信済み、または失敗のいずれかです。ネットワークが回復する可能性のある失敗（時間内に応答がない、接続の失敗、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がエラーを返した場合は、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がアウトバウンド送金のために実行した取引相手探索の1ステップで、実行された順に並びます。ルートを持つ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が指定された場合の、そのディレクトリ上の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`の送金を先に進める要素1つです。[送金が停止している理由](/ja/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を選択するか、お客様が`action=beneficiary_vasp`でPATCHします。`declare_self_hosted`:
            エンドユーザーがウィジェットでウォレットをセルフホスト型として申告します。`add_vasp_hint`:
            VASP名、LEI、またはトラベルアドレス（例:
            送金先ウォレットのアドレス帳エントリーの`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: >-
        送金のチェーンが2つのウォレットをどのように示すか（1つのアドレスが別のアドレスに支払う形態にとどまらない場合）。アカウント型チェーンの送金（EVM、Solana、Tron）では2つのアドレスがそのままウォレットとなるため、空（`{}`）になります。照合、ルーティング、アドレス帳は、まずここからウォレットを読み取ります。
      properties:
        chain:
          type: string
          description: 正規チェーン(例:`BTC`、`XRP`、Lightning送金の場合は`LIGHTNING`)。
        shape:
          type: string
          enum:
            - utxo
            - memo
            - lightning
        originator:
          $ref: '#/components/schemas/TravelRuleChainSide'
        beneficiary:
          $ref: '#/components/schemas/TravelRuleChainSide'
        utxo:
          type: object
          description: 'UTXO送金の場合: 保存されている入力と出力(金額は10進数の文字列)、および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の不整合です。申告された送金人が入力に含まれていない、申告された受取人が出力に含まれていない、受取人の出力を1つに特定できない、または受取人の出力の支払額が取引に記載された金額と異なる場合が該当します。
        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: >-
            ウォレット。メモ型ネットワークではクラシックアドレス(XRPのXアドレスはクラシックアドレスとタグに分割されます)、Lightningでは受取人のノードIDまたはLightning
            Addressです。
        memo:
          type: string
          description: ウォレットの一部となる宛先タグまたはメモです。ない場合は`""`です。
        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`（Lightningの支払いリクエストが指定する受取人）、`updated`（後から`action:
            update_originator_wallet`で設定）。
    TravelRuleUtxoEntry:
      type: object
      description: UTXO取引の入力または出力1件。チェーンに記録されたとおりの内容です。
      required:
        - address
      properties:
        address:
          type: string
          maxLength: 128
        amount:
          type: string
          nullable: true
          description: その通貨自体の単位（satoshiではなくBTC）での10進数文字列。任意。
          example: '0.0125'
        txid:
          type: string
          maxLength: 128
          description: 任意。入力が使用する取引です。
        vout:
          type: integer
          nullable: true
          minimum: 0
          description: 任意。入力が使用する出力のインデックスです。
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        お客様のアプリケーションのAPIキーです。Business ConsoleのDevelopers -> API
        keysで取得できます。プライマリキーはフルアクセス権を持ちます。名前付きキーにはスコープを設定できます。リソースごとのアクセス権（なし、読み取り、書き込み）、一部のワークフローまたは承認済みセッションへの限定、IPアドレスのリストへの限定、有効期限の設定です。401は、キーが誤っている、失効している、または期限切れであることを意味します。403は、キーが送信されていない、キーにこのリソースやアクションへのアクセス権がない、またはIPリスト外のアドレスからリクエストが送信されたことを意味します。セッションのルートでの404は、セッションがキーのワークフローまたはステータスの対象外であることを意味します。メディアへのアクセス権がないキーでは、画像、動画、PDFのURLがnullで返されます。セッションの書き込み権限がないキーでは、セッションのリンクとトークンがnullで返されます。詳細は次を参照してください:
        https://docs.didit.me/console/api-keys

````

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