Overview
Digital Credentials integration lets you verify identity documents (passports, ID cards, driver’s licenses) stored in device wallets like Google Wallet and Apple Wallet. Your app requests the credential, the user consents, and Hopae Connect validates the cryptographically signed response.When to use this integration:
- Building a native mobile app (Android or iOS)
- Building a web app that calls the DC API directly
- Want the wallet request payload returned immediately (no QR scan or polling)
- Verifying credentials from decentralized wallet providers (e.g.,
us-id-pass)
How it works
Prerequisites
- API credentials from the Console
- A DC-enabled provider (e.g.,
us-id-pass) enabled for your app - Android: CredentialManager API (requires Google Play Services)
- iOS: Safari 26+ with Digital Credentials API support
- Web: Chrome 128+ with Digital Credentials API support
Implementation Steps
Step 1: Create Verification Session
Create a verification withoptions.mode = "native" to receive the wallet request payload immediately in the response.
Options parameters
| Parameter | Required | Description |
|---|---|---|
mode | Yes | Set to "native" to receive the wallet request payload in the response. Without this, the payload is not returned. |
platform | Yes | "android" or "ios". Determines the VP request format — Android returns JSON (OpenID4VP), iOS returns binary CBOR (ISO mDOC). |
expected_origins | Yes | Array of origins your app presents credentials from. The wallet validates that the request originates from one of these before releasing the credential. |
Response
When
platform is "ios", the request.data contains deviceRequest and encryptionInfo (binary CBOR) instead of the JSON fields shown above.flowDetails.request — pass this to the device wallet in step 2. The session expires after 30 minutes.
Step 2: Request Credential from Wallet
PassflowDetails.request from step 1 to the W3C Digital Credentials API on your platform. This step happens entirely on-device — no Hopae API call is needed.
- Android
- iOS / Web
Use Android CredentialManager with
GetDigitalCredentialOption:Step 3: Submit Wallet Response
Send the signed credential response to Hopae Connect for validation.| Parameter | Description |
|---|---|
sessionId | The verificationId from step 1. |
response | The signed credential string from step 2. |
This endpoint does not require authentication. The credential is validated cryptographically by the Verifier — signature verification, nonce binding, origin check, and trust chain validation against government issuer certificates. A forged or replayed credential is rejected regardless of the caller.
Step 4: Retrieve Verified Claims
Once the verification is complete, retrieve the normalized identity data with provenance.Response
Identity claims are available in
provenance.presentation.credentials[].claims. The sub field is a stable pseudonymous identifier derived from the document number — consistent across verifications of the same document.Error Handling
- API Errors
- Client-Side Errors
| Scenario | Step | Error |
|---|---|---|
| Invalid credentials | 1, 4 | 401 AUTH_INVALID_CREDENTIALS |
| Provider not enabled | 1 | 400 PROVIDER_NOT_ENABLED |
| Provider doesn’t support native mode | 1 | 400 PROVIDER_ERROR |
Missing platform in native mode | 1 | 400 VALIDATION_MISSING_PARAMETER |
| Invalid / tampered credential | 3 | { status: "fail", code: "VERIFICATION_FAILED" } |
| Session expired | 3, 4 | 400 SESSION_EXPIRED |
| Verification not found | 4 | 404 SESSION_VERIFICATION_NOT_FOUND |
Available Providers
| Provider ID | Credential | Country | Platforms |
|---|---|---|---|
us-id-pass | US Digital Passport (ID PASS) | US | Android, iOS |
providerId changes.
Comparison with Standard API Flow
| Standard API Flow | DC Native Flow | |
|---|---|---|
| Providers | Most eIDs (QR, redirect, push) | Wallet providers (DC API) |
| API calls | 2–3 + polling | 3 (no polling) |
| Wallet interaction | Handled by Hopae web UI | Your app calls DC API directly |
| Credential format | OAuth2/OIDC tokens | W3C Verifiable Presentation |
options.mode | Not needed | "native" required |
Next Steps
Standard API Integration
For QR, redirect, and push flow providers
Verification API Reference
Full endpoint documentation
Return Data Model
Understanding user claims and provenance
Digital ID Types
Learn about wallet-based credentials

