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

> ادمج التحقق من الهوية عبر Google Wallet ID في تطبيقك مع Didit. اطّلع على الدول المدعومة وخطوات المصادقة والنتائج والأسعار.

ابدأ التحقق من Google Wallet ID من الخادم الخلفي باستخدام مفتاح API الخاص بتطبيقك.
لا تحتاج إلى سير عمل أو إلى `workflow_id`.
تصف استجابة البدء إجراء المصادقة التالي، وهي ليست نتيجة هوية مقبولة.

## التغطية والتفعيل

| الخاصية | القيمة |
| - | - |
| المحفظة | Google Wallet ID |
| معرّف المحفظة | `google_wallet` |
| الدول | ![](https://didit-public-assets.s3.eu-west-1.amazonaws.com/flags/us.svg)الولايات المتحدة، ![](https://didit-public-assets.s3.eu-west-1.amazonaws.com/flags/gb.svg)المملكة المتحدة، ![](https://didit-public-assets.s3.eu-west-1.amazonaws.com/flags/br.svg)البرازيل، ![](https://didit-public-assets.s3.eu-west-1.amazonaws.com/flags/sg.svg)سنغافورة، ![](https://didit-public-assets.s3.eu-west-1.amazonaws.com/flags/tw.svg)تايوان |
| تفعيل المحفظة للإنتاج | ✅ متاح |
| سعر المحفظة المنشور | \$0.20 لكل عملية تحقق مكتملة |

تفعيل المحفظة منفصل عن نشر الواجهة البرمجية وعن أهلية تطبيقك.
لا يُفعّل endpoint موثّق محفظةً مُعلَّمة بعبارة «قريبًا».
للاطلاع على الأسعار المنشورة الحالية، راجع [أسعار محافظ الهوية الرقمية](https://docs.didit.me/ar/getting-started/pricing.md#تسعير-محفظة-الهوية-الرقمية).

## ما الذي يفعله الشخص

تطلب صفحتك أو تطبيقك من Google Wallet نفسها: لا توجد إعادة توجيه ولا صفحة مستضافة من Didit.
مرّر `next_action.digital_credentials.request` إلى `navigator.credentials.get({digital: request})` ضمن إيماءة من المستخدم على `origin` الذي بدأت به، أو إلى Android Credential Manager بوصفه `GetDigitalCredentialOption`.
ثم أرسل ما تعيده المحفظة إلى [إرسال رد المحفظة](https://docs.didit.me/ar/standalone-apis/digital-id-wallet-response.md).
يعرض المتصفح رمز QR الخاص به عندما تكون المحفظة على جهاز آخر.

## استلام النتيجة

اتبع [دليل واجهة برمجة تطبيقات محافظ الهوية الرقمية](https://docs.didit.me/ar/standalone-apis/digital-id-wallets.md) لتتبع التحقق واسترجاع نتيجته.
اعتبر النتيجة المكتملة والمتحقق منها فقط دليلاً على أن المحفظة تحققت من هوية الشخص.
تختلف سمات الهوية المُعادة بحسب المحفظة، فلا تفترض وجود العنوان أو الصورة الشخصية أو كل السمات المطلوبة.

## ذات صلة

* [واجهات برمجة تطبيقات محافظ الهوية الرقمية](https://docs.didit.me/ar/standalone-apis/digital-id-wallets.md)
* [تغطية المحفظة وسماتها](https://docs.didit.me/ar/core-technology/id-verification/digital-id-wallets.md)
* [الأسعار](https://docs.didit.me/ar/getting-started/pricing.md#تسعير-محفظة-الهوية-الرقمية)


## OpenAPI

````yaml ar/openapi-25.json POST /v3/id-verification/wallets/google-wallet/
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/google-wallet/:
    post:
      tags:
        - Digital ID wallets
      summary: بدء التحقق عبر Google Wallet
      description: >-
        بدء تسجيل الدخول عبر Google Wallet (Google Wallet (بطاقة الهوية الرقمية)
        وجهات الإصدار في الولايات الأمريكية (رخصة القيادة على الهاتف المحمول)؛
        USA، GBR، BRA، SGP، TWN) بدون أي سير عمل. تتم الفوترة مرة واحدة فقط عند
        التحقق من الهوية. تتضمن الاستجابة
        next_action.type=request_digital_credential مع طلب وقّعته Didit لتطبيقك،
        وهو صالح للاستخدام فقط من الأصل. عند تفاعل المستخدم هناك، مرِّر
        next_action.digital_credentials.request إلى
        navigator.credentials.get({digital: ...}) (أو إلى Android Credential
        Manager كـ GetDigitalCredentialOption requestJson)، ثم أرسل ما تُرجعه
        المحفظة عبر POST إلى
        /v3/id-verification/wallets/verifications/{request_id}/response/. يعرض
        المتصفح رمز QR الخاص به عندما تكون المحفظة على جهاز آخر. تتلقى التطبيقات
        في البيئة التجريبية محاكاة حتمية (simulated: true) لا تتصل بمزود الخدمة
        أبداً.
      operationId: start_google_wallet_wallet_verification
      parameters:
        - in: header
          name: Idempotency-Key
          schema:
            type: string
          description: >-
            مفتاح اختياري لأمان إعادة المحاولة (بحد أقصى 255 حرفاً). تؤدي إعادة
            المحاولة بنفس المفتاح والمحفظة ونص الطلب إلى إرجاع عملية التحقق
            الأصلية دون بدء تسجيل دخول ثانٍ؛ أما استخدام نفس المفتاح مع محفظة أو
            نص طلب آخر فيُرجع 409 idempotency_key_reused.
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest
            example:
              country: USA
              vendor_data: your-customer-reference
              metadata:
                reference: example
              origin: https://app.example.com
          application/x-www-form-urlencoded:
            schema:
              $ref: >-
                #/components/schemas/DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest
        required: true
      responses:
        '201':
          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: Not Finished
                  outcome: pending
                  error: null
                  interaction: digital_credentials
                  simulated: false
                  expires_at: '2026-01-01T10:10:00Z'
                  next_action:
                    type: request_digital_credential
                    digital_credentials:
                      protocol: openid4vp-v1-signed
                      request:
                        requests:
                          - protocol: openid4vp-v1-signed
                            data:
                              request: <compact JWS signed by Didit>
                  identity: null
                  attributes: null
                  level_of_assurance: null
                  verified_at: null
                  signature_valid: null
                  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]})، أو الخطأ
            return_url_invalid، return_url_not_allowed، origin_invalid،
            origin_not_allowed، invalid_personal_code، invalid_phone_number أو
            idempotency_key_invalid.
        '403':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden
          description: >-
            بيانات اعتماد مفقودة ({detail})، أو الخطأ wallet_unavailable، أو
            insufficient_credits، أو contract_rate_missing.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DigitalIdWalletApiWalletVerificationError'
          description: >-
            الخطأ idempotency_key_reused أو idempotency_key_in_progress (مع
            Retry-After).
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DigitalIdWalletApiWalletVerificationError'
          description: >-
            الخطأ wallet_provider_unavailable: تعذر بدء تشغيل المزود؛ لم يتم
            إنشاء أي شيء.
        '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/google-wallet/ \
              --header 'x-api-key: YOUR_API_KEY' \
              --header 'Idempotency-Key: your-unique-attempt-key' \
              --header 'Content-Type: application/json' \
              --data '{
              "country": "USA",
              "vendor_data": "your-customer-reference",
              "metadata": {
                "reference": "example"
              },
              "origin": "https://app.example.com"
            }'
components:
  schemas:
    DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest:
      type: object
      description: بدء عملية تحقق عبر Google Wallet (USA، GBR، BRA، SGP، TWN).
      properties:
        vendor_data:
          type: string
          nullable: true
          description: >-
            المرجع الخاص بك لعملية التحقق هذه (مثل معرّف المستخدم لديك). يُعاد
            في النتائج وwebhook.
        metadata:
          type: object
          additionalProperties: {}
          nullable: true
          description: كائن JSON اختياري يُخزن مع التحقق ويُعاد في النتائج وwebhook.
        sandbox_scenario:
          type: string
          minLength: 1
          description: >-
            لتطبيقات البيئة التجريبية فقط: النتيجة المحاكاة - 'wallet_cancelled'
            أو 'wallet_timeout' أو 'wallet_provider_error'؛ وأي سيناريو آخر (أو
            عدم تحديد أي سيناريو) يُكمل التحقق بنجاح. يُرفض في تطبيقات بيئة
            الإنتاج. القائمة الكاملة متاحة عبر GET /v1/sandbox/scenarios/.
        country:
          allOf:
            - $ref: >-
                #/components/schemas/DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum
          description: |-
            رمز الدولة حسب معيار ISO 3166-1 alpha-3 لهوية Google Wallet.

            * `USA` - USA
            * `GBR` - GBR
            * `BRA` - BRA
            * `SGP` - SGP
            * `TWN` - TWN
        origin:
          type: string
          minLength: 1
          description: >-
            المكان الذي ستطلب فيه صفحتك أو تطبيقك من المحفظة: أصل https الخاص
            بصفحتك (يجب أن يكون مضيفه ضمن allowed_return_hosts الخاصة بالتطبيق،
            أو يكون نطاق العلامة البيضاء الخاص به)، مثل https://app.example.com،
            أو android:apk-key-hash:<base64 SHA-256 لشهادة توقيع تطبيقك، دون
            حشو>. ترفض المحفظة الطلب في أي مكان آخر.
          maxLength: 256
      required:
        - country
        - origin
    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'
    DigitalIdWalletApiWalletVerificationStartForbidden:
      oneOf:
        - $ref: >-
            #/components/schemas/DigitalIdWalletApiClientCredentialsForbiddenErrorMessage
        - $ref: '#/components/schemas/DigitalIdWalletApiWalletVerificationError'
    DigitalIdWalletApiWalletVerificationError:
      type: object
      properties:
        error:
          type: string
          description: رمز ثابت قابل للقراءة آلياً، مثل wallet_unavailable.
        detail:
          type: string
      required:
        - detail
        - error
    DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum:
      enum:
        - USA
        - GBR
        - BRA
        - SGP
        - TWN
      type: string
      description: |-
        * `USA` - USA
        * `GBR` - GBR
        * `BRA` - BRA
        * `SGP` - SGP
        * `TWN` - TWN
    DigitalIdWalletApiWalletVerificationResult:
      type: object
      properties:
        wallet:
          allOf:
            - $ref: '#/components/schemas/DigitalIdWalletApiWallet'
          readOnly: true
        country:
          type: string
        status:
          type: string
          description: >-
            غير منتهية أثناء الانتظار، ثم تصبح مقبولة (تم التحقق منها) أو
            مرفوضة.
        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
    DigitalIdWalletApiClientCredentialsForbiddenErrorMessage:
      type: object
      properties:
        detail:
          type: string
          default: Forbidden - User doesn't have permission
    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:
            عبر إجراء من المستخدم على المصدر (origin) الذي بدأت منه، اطلب من
            المحفظة باستخدام 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 الخاص بتطبيقك، من Developers -> API keys في Business Console.
        يمتلك المفتاح الأساسي وصولاً كاملاً. يمكن تحديد نطاق المفتاح المسمى: لا
        شيء، أو قراءة، أو كتابة لكل مورد، ومحدوداً ببعض مسارات العمل أو بالجلسات
        المقبولة، وبقائمة من عناوين IP، وبتاريخ انتهاء الصلاحية. يشير 401 إلى أن
        المفتاح غير صحيح أو ملغى أو منتهي الصلاحية؛ ويشير 403 إلى أنه لم يتم
        إرسال أي مفتاح، أو أن المفتاح ليس لديه حق الوصول إلى هذا المورد أو
        الإجراء، أو أن الطلب جاء من عنوان خارج قائمة عناوين IP الخاصة به؛ ويشير
        404 في مسار جلسة إلى أن الجلسة خارج مسارات العمل أو الحالات الخاصة
        بالمفتاح. يتلقى المفتاح الذي لا يمتلك حق الوصول إلى الوسائط عناوين URL
        للصور ومقاطع الفيديو وملفات PDF كـ null، ويتلقى المفتاح الذي لا يمتلك
        إذن كتابة للجلسات روابط الجلسة وtoken كـ null. راجع
        https://docs.didit.me/console/api-keys.
    BearerAuth:
      type: http
      scheme: bearer
      description: token الوصول الخاص باعتماد العميل للتطبيق.

````

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