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

# デジタル認証情報ウォレットのレスポンスを送信する

> Google WalletなどのDigital Credentials APIウォレットがページやアプリに返した認証情報のレスポンスをDiditに送信すると、Diditが認証の判定を行います。

このオペレーションは、開始時のレスポンスに`next_action.type = request_digital_credential`が含まれるウォレット(Google Walletなど)に使用します。
認証には、検証を開始したアプリケーションのAPIキーを使用し、バックエンドから呼び出してください。

ウォレットが返した内容をそのまま送信してください。ブラウザの場合は`navigator.credentials.get`から得た`{protocol, data}`、Androidの場合はAndroid Credential Managerから得てパースした`credentialJson`です。
このレスポンスはDidit向けに暗号化されているため、改変しないでください。
Diditは、信頼済みの発行者ルートに照らした発行者の署名、署名付きダイジェストに照らした返却されたすべての値、そして`origin`とこのリクエストに対するデバイス署名を検証し、そのうえで検証の判定を行います。

レスポンスを送信できるのは1回のみです。
2回目の送信では、すでに判定済みの検証が返されます。
ウォレットのレスポンスを受け付けない検証の場合は、`error: "not_a_digital_credentials_wallet"`とともに`409`が返されます。

ブラウザおよびAndroidのスニペットを含む一連の流れについては、[デジタルIDウォレットAPI](https://docs.didit.me/ja/standalone-apis/digital-id-wallets.md#digital-credentialsウォレット-google-wallet)を参照してください。


## OpenAPI

````yaml ja/openapi-25.json POST /v3/id-verification/wallets/verifications/{request_id}/response/
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/id-verification/wallets/verifications/{request_id}/response/:
    post:
      tags:
        - Digital ID wallets
      summary: ウォレットのレスポンスを送信する
      description: >-
        Digital Credentials APIのウォレット（Google
        Wallet）：next_actionがrequest_digital_credentialである検証について、ウォレットがページまたはアプリに返した内容を送信します。Diditはそれを復号し、信頼できる発行者ルートに照らして発行者の署名を、署名済みダイジェストに照らして返された各値を、さらにオリジンとこのリクエストに対するデバイス署名を検証したうえで、検証を判定します。結果はverified（1回のみ請求）またはエラーコード付きのdeclinedです。1回限りの使用で、2回目の送信では判定済みの検証が返されます。
      operationId: submit_wallet_verification_response
      parameters:
        - in: path
          name: request_id
          schema:
            type: string
            format: uuid
          description: 開始エンドポイントが返したrequest_idです。
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/DigitalIdWalletApiWalletDigitalCredentialResponseRequest
            example:
              response:
                protocol: openid4vp-v1-signed
                data:
                  response: <compact JWE returned by the wallet>
          application/x-www-form-urlencoded:
            schema:
              $ref: >-
                #/components/schemas/DigitalIdWalletApiWalletDigitalCredentialResponseRequest
            example:
              response:
                protocol: openid4vp-v1-signed
                data:
                  response: <compact JWE returned by the wallet>
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/DigitalIdWalletApiWalletDigitalCredentialResponseRequest
            example:
              response:
                protocol: openid4vp-v1-signed
                data:
                  response: <compact JWE returned by the wallet>
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/DigitalIdWalletApiWalletVerificationResponse
              example:
                request_id: 00000000-0000-4000-8000-000000000001
                wallet_verification:
                  wallet:
                    id: google_wallet
                    name: Google Wallet
                    issuing_authority: >-
                      Google Wallet (ID pass) and US state issuers (mobile
                      driving licence)
                  country: USA
                  status: Approved
                  outcome: verified
                  error: null
                  interaction: digital_credentials
                  simulated: false
                  expires_at: '2026-01-01T10:10:00Z'
                  next_action: null
                  identity:
                    full_name: Alex Example
                    first_name: Alex
                    last_name: Example
                    date_of_birth: '1990-01-31'
                    nationality: USA
                    issuing_state: USA
                  attributes:
                    document_number: X0000000
                    document_expiry_date: '2030-01-31'
                  level_of_assurance: substantial
                  verified_at: '2026-01-01T10:01:00Z'
                  signature_valid: true
                  credential_type: person_identification
                vendor_data: your-customer-reference
                metadata:
                  reference: example
                created_at: '2026-01-01T10:00:00Z'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest
          description: 'フィールドのバリデーションエラー({field: [messages]})。'
        '403':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/DigitalIdWalletApiClientCredentialsForbiddenErrorMessage
          description: '認証情報がありません（x-api-keyまたはAuthorization: Bearer）。'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DigitalIdWalletApiWalletVerificationError'
          description: エラーnot_found：このアプリケーションのウォレット認証に、このrequest_idを持つものはありません。
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DigitalIdWalletApiWalletVerificationError'
          description: エラーnot_a_digital_credentials_wallet：この認証はウォレットのレスポンスを受け付けません。
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DigitalIdWalletApiWalletVerificationError'
          description: エラーwallet_not_configured：この環境ではウォレットを検証できません。
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl --request POST \
              --url https://verification.didit.me/v3/id-verification/wallets/verifications/REQUEST_ID/response/ \
              --header 'x-api-key: YOUR_API_KEY' \
              --header 'Content-Type: application/json' \
              --data '{
              "response": {
                "protocol": "openid4vp-v1-signed",
                "data": {
                  "response": "<compact JWE returned by the wallet>"
                }
              }
            }'
components:
  schemas:
    DigitalIdWalletApiWalletDigitalCredentialResponseRequest:
      type: object
      description: '``request_digital_credential``認証において、ウォレットがあなたのページまたはアプリに返した応答です。'
      properties:
        response:
          type: object
          additionalProperties: {}
          description: >-
            ウォレットが返した内容そのものです。navigator.credentials.getで取得したDigitalCredentialのprotocolとdata、またはAndroidのDigitalCredentialを解析したcredentialJsonです。Didit宛てに暗号化されているため、変更しないでください。
      required:
        - response
    DigitalIdWalletApiWalletVerificationResponse:
      type: object
      description: すべてのウォレットエンドポイントが返す形式の、単独のウォレット検証1件です。
      properties:
        request_id:
          type: string
          format: uuid
        wallet_verification:
          $ref: '#/components/schemas/DigitalIdWalletApiWalletVerificationResult'
        vendor_data:
          type: string
          nullable: true
        metadata:
          type: object
          additionalProperties: {}
          nullable: true
          description: 開始時に送信されたmetadataオブジェクト、またはnullです。
        created_at:
          type: string
          format: date-time
      required:
        - created_at
        - metadata
        - request_id
        - vendor_data
        - wallet_verification
    DigitalIdWalletApiWalletVerificationStartBadRequest:
      oneOf:
        - $ref: '#/components/schemas/DigitalIdWalletApiWalletVerificationError'
        - $ref: '#/components/schemas/DigitalIdWalletApiWalletVerificationFieldErrors'
    DigitalIdWalletApiClientCredentialsForbiddenErrorMessage:
      type: object
      properties:
        detail:
          type: string
          default: Forbidden - User doesn't have permission
    DigitalIdWalletApiWalletVerificationError:
      type: object
      properties:
        error:
          type: string
          description: '安定した機械可読コード（例: wallet_unavailable）。'
        detail:
          type: string
      required:
        - detail
        - error
    DigitalIdWalletApiWalletVerificationResult:
      type: object
      properties:
        wallet:
          allOf:
            - $ref: '#/components/schemas/DigitalIdWalletApiWallet'
          readOnly: true
        country:
          type: string
        status:
          type: string
          description: 保留中はNot Finished、その後Approved（認証済み）またはDeclinedになります。
        outcome:
          $ref: >-
            #/components/schemas/DigitalIdWalletApiWalletVerificationResultOutcomeEnum
        error:
          type: string
          nullable: true
          readOnly: true
        interaction:
          allOf:
            - $ref: '#/components/schemas/DigitalIdWalletApiInteractionEnum'
          readOnly: true
        simulated:
          type: boolean
          readOnly: true
        expires_at:
          type: string
          format: date-time
        next_action:
          allOf:
            - $ref: '#/components/schemas/DigitalIdWalletApiWalletNextAction'
          nullable: true
          readOnly: true
        identity:
          allOf:
            - $ref: '#/components/schemas/DigitalIdWalletApiWalletIdentity'
          nullable: true
          readOnly: true
        attributes:
          type: object
          additionalProperties: {}
          nullable: true
          readOnly: true
        level_of_assurance:
          type: string
          nullable: true
        verified_at:
          type: string
          format: date-time
          nullable: true
        signature_valid:
          type: boolean
          nullable: true
          description: クレデンシャルの署名が検証されるとtrue、シミュレートされたものの場合はnull。
        credential_type:
          type: string
          nullable: true
      required:
        - attributes
        - country
        - credential_type
        - error
        - expires_at
        - identity
        - interaction
        - level_of_assurance
        - next_action
        - outcome
        - signature_valid
        - simulated
        - status
        - verified_at
        - wallet
    DigitalIdWalletApiWalletVerificationFieldErrors:
      type: object
      description: リクエストのバリデーションエラー：拒否された各フィールドとそのメッセージ。
      additionalProperties:
        type: array
        items:
          type: string
    DigitalIdWalletApiWallet:
      type: object
      properties:
        id:
          type: string
          description: 'ウォレットのカタログID（例: bankid_se）。'
        name:
          type: string
        issuing_authority:
          type: string
          nullable: true
      required:
        - id
        - issuing_authority
        - name
    DigitalIdWalletApiWalletVerificationResultOutcomeEnum:
      enum:
        - pending
        - verified
        - cancelled
        - timeout
        - failed
      type: string
      description: |-
        * `pending` - 保留中
        * `verified` - 検証済み
        * `cancelled` - ユーザーによりキャンセル
        * `timeout` - タイムアウト
        * `failed` - 失敗
    DigitalIdWalletApiInteractionEnum:
      enum:
        - redirect
        - in_app
        - digital_credentials
      type: string
      description: |-
        * `redirect` - redirect
        * `in_app` - in_app
        * `digital_credentials` - digital_credentials
    DigitalIdWalletApiWalletNextAction:
      type: object
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/DigitalIdWalletApiWalletNextActionTypeEnum'
          description: >-
            redirect：ユーザーのブラウザをurlに遷移させます。confirm_in_app：verification_codeをユーザーに表示します。ユーザーはそれがウォレットアプリ内のコードと一致することを確認し、ウォレットアプリで承認します。その後、ポーリングしてください。request_digital_credential：開始時と同じオリジン上で、ユーザー操作の中でdigital_credentials.requestを使ってウォレットにリクエストし、返された内容をPOST
            .../verifications/{request_id}/response/に送信します。


            * `redirect` - redirect

            * `confirm_in_app` - confirm_in_app

            * `request_digital_credential` - request_digital_credential
        url:
          type: string
          format: uri
          description: redirectのみ：ユーザーがウォレットでサインインする場所。
        digital_credentials:
          allOf:
            - $ref: >-
                #/components/schemas/DigitalIdWalletApiWalletDigitalCredentialsRequest
          description: request_digital_credentialのみ：ウォレットに渡すリクエスト。
        verification_code:
          type: string
          description: confirm_in_appのみ：ウォレットアプリにも表示される4桁の照合コード。
        poll_interval_seconds:
          type: integer
          description: >-
            confirm_in_appのみ：迅速なフィードバックを得るためにPOST
            .../verifications/{request_id}/poll/を呼び出す間隔。Diditは保留中のサインインもバックグラウンドでポーリングするため、ポーリングしない場合でもWebhookが結果を通知します。
      required:
        - type
    DigitalIdWalletApiWalletIdentity:
      type: object
      properties:
        full_name:
          type: string
          nullable: true
        first_name:
          type: string
          nullable: true
        last_name:
          type: string
          nullable: true
        date_of_birth:
          type: string
          format: date
          nullable: true
        nationality:
          type: string
          nullable: true
          description: ISO3形式の国籍。ウォレットが国籍を示している場合のみ返されます（推測されることはありません）。
        issuing_state:
          type: string
          description: IDを発行したスキームの国を示すISO3コード。
      required:
        - date_of_birth
        - first_name
        - full_name
        - issuing_state
        - last_name
        - nationality
    DigitalIdWalletApiWalletNextActionTypeEnum:
      enum:
        - redirect
        - confirm_in_app
        - request_digital_credential
      type: string
      description: |-
        * `redirect` - redirect
        * `confirm_in_app` - confirm_in_app
        * `request_digital_credential` - request_digital_credential
    DigitalIdWalletApiWalletDigitalCredentialsRequest:
      type: object
      properties:
        protocol:
          type: string
          description: openid4vp-v1-signed。
        request:
          type: object
          additionalProperties: {}
          description: >-
            そのまま渡してください。ブラウザではnavigator.credentials.get({digital:
            request})、AndroidではGetDigitalCredentialOptionのrequestJsonとしてJSON.stringify(request)を使用します。Diditがお客様のアプリケーション向けに署名しています。
      required:
        - protocol
        - request
  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
    BearerAuth:
      type: http
      scheme: bearer
      description: アプリケーションのクライアントクレデンシャルのアクセストークン。

````

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