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

# Отправка ответа Digital Credentials Wallet

> Отправьте в Didit ответ с учетными данными от цифрового кошелька, например Google Wallet, и получите решение по верификации.

Используйте эту операцию для кошелька, в ответе на запуск которого есть `next_action.type = request_digital_credential`, например Google Wallet.
Выполняйте аутентификацию с помощью API-ключа приложения, которым была запущена верификация, с вашего бэкенда.

Отправьте именно то, что вернул кошелёк: `{protocol, data}` из `navigator.credentials.get` в браузере или разобранный `credentialJson` из Android Credential Manager.
Ответ зашифрован для Didit, поэтому не изменяйте его.
Didit проверяет подпись издателя с доверенными корнями издателя, каждое возвращённое значение по подписанному дайджесту и подпись устройства по вашему `origin` и этому запросу, после чего принимает решение по верификации.

Ответ можно отправить только один раз.
Повторная отправка возвращает уже принятое решение по верификации.
Для верификации, которая не предусматривает ответ кошелька, сервер отвечает кодом `409` с `error: "not_a_digital_credentials_wallet"`.

Полную последовательность, включая фрагменты для браузера и Android, см. в разделе [API цифрового ID-кошелька](https://docs.didit.me/ru/standalone-apis/digital-id-wallets.md#кошельки-digital-credentials-google-wallet).


## OpenAPI

````yaml ru/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 расшифровывает
        данные, проверяет подпись эмитента по доверенным корневым сертификатам
        эмитента, каждое возвращённое значение по его подписанному дайджесту, а
        подпись устройства относительно вашего origin и этого запроса, после
        чего выносит решение по верификации: verified (с однократным списанием
        средств) или declined с кодом ошибки. Одноразовое использование:
        повторная отправка возвращает уже принятое решение по верификации.
      operationId: submit_wallet_verification_response
      parameters:
        - in: path
          name: request_id
          schema:
            type: string
            format: uuid
          description: request_id, возвращённый endpoint запуска.
          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: >-
            В точности то, что вернул кошелёк: {protocol, data} объекта
            DigitalCredential из navigator.credentials.get или распарсенный
            credentialJson объекта DigitalCredential Android. Зашифровано для
            Didit; не изменяйте это значение.
      required:
        - response
    DigitalIdWalletApiWalletVerificationResponse:
      type: object
      description: >-
        Одна отдельная верификация кошелька в том виде, в котором её возвращает
        каждый endpoint для кошельков.
      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: Объект метаданных, переданный при запуске, или 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: Каталожный идентификатор кошелька, например 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: Страна по 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}) в
            браузере или JSON.stringify(request) как requestJson для
            GetDigitalCredentialOption на Android. Подписано Didit для вашего
            приложения.
      required:
        - protocol
        - request
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API-ключ вашего приложения из раздела «Разработчикам» -> «API-ключи» в
        Business Console. Основной ключ имеет полный доступ. Именованный ключ
        может иметь ограниченную область действия: без доступа, чтение или
        запись для каждого ресурса, ограничение определенными сценариями или
        одобренными сессиями, списком IP-адресов и сроком действия. 401
        означает, что ключ неверен, отозван или его срок действия истек; 403
        означает, что ключ не был передан, у ключа нет доступа к этому ресурсу
        или действию, либо запрос поступил с адреса вне его списка IP-адресов;
        404 на маршруте сессии означает, что сессия не входит в сценарии или
        статусы ключа. Ключ без доступа к медиа получает URL изображений, видео
        и PDF как 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.