The Credential Handler API (CHAPI) is a web standard that defines a programmatic interface for websites to interact with a user's digital wallet or credential repository. It allows a relying party (e.g., a website) to request a credential (like a verifiable credential or a traditional login) and for a user to select a wallet to fulfill that request. This creates a seamless, user-centric flow for credential exchange, moving beyond the legacy model of centralized identity providers and manual form entry. CHAPI is a key enabling technology for decentralized identity (DID) and self-sovereign identity (SSI) ecosystems on the web.
Credential Handler API (CHAPI)
What is Credential Handler API (CHAPI)?
The Credential Handler API (CHAPI) is a W3C-specified browser API that enables websites to request and store verifiable digital credentials directly in a user's digital wallet, bypassing traditional form-filling.
Technically, CHAPI operates through two primary methods: navigator.credentials.get() for requesting credentials and navigator.credentials.store() for storing them. When a site calls get(), the browser invokes a credential handler registered by the user's wallet software, which presents a UI for the user to select and release a credential. The wallet, not the website, controls the user interface and the private keys, ensuring the user maintains custody of their data. This architecture is analogous to the Payment Request API, but for identity and attestations instead of financial transactions.
A core use case for CHAPI is passwordless login. Instead of typing a username and password, a user can select a verifiable credential from their wallet to authenticate, such as a signed email attestation. Other applications include instant age verification, sharing verified educational diplomas for job applications, or presenting loyalty program memberships. By providing a standardized bridge between websites and diverse wallet implementations, CHAPI solves the critical discovery and interoperability problem in decentralized identity, allowing any wallet that supports the API to work with any compliant website.
How CHAPI Works
The Credential Handler API (CHAPI) is a browser-based interface that enables websites to request and store digital credentials, such as Verifiable Credentials, without requiring a centralized intermediary.
The Credential Handler API (CHAPI) is a W3C-specified JavaScript API that acts as a standardized bridge between a Relying Party (a website requesting a credential) and a user's digital wallet or credential store. It provides a secure, user-centric method for websites to invoke a credential selection interface native to the browser or an installed wallet extension. This process, often called a credential mediation, allows users to choose which credentials to share from their wallet in response to a site's request, such as proving age or membership, without the website directly accessing the wallet's contents.
The workflow begins when a Relying Party calls navigator.credentials.get() with a Web Credential query. This triggers the browser to present the user with a selection of compatible credentials from their registered wallet handlers. Upon user selection, the wallet returns the requested credential data to the website via the API. Conversely, for storing credentials, a site calls navigator.credentials.store(), prompting the user to save a received credential, like a digital driver's license, into their chosen wallet. This decouples credential storage from individual websites, giving users portable digital identity control.
Under the hood, CHAPI relies on a Credential Handler—a web application (the wallet) that registers itself with the user's browser using a manifest file. This registration declares the wallet's capability to handle specific credential types. The API itself is agent-agnostic, meaning it does not dictate wallet implementation; it simply defines the communication protocol. This design is foundational for SSI (Self-Sovereign Identity) architectures, enabling interoperable credential exchanges across different wallets and websites while keeping the user in control of the data flow.
A key security benefit is the prevention of tracking and phishing. Because the credential exchange is mediated by the browser API, the Relying Party never directly contacts the wallet provider; it only receives the credential data the user consents to share. This stands in contrast to traditional OAuth flows that often redirect users to third-party sites. For developers, integrating CHAPI involves polyfilling the API for broader browser support and structuring requests using the Verifiable Credentials Data Model to ensure interoperability across the decentralized identity ecosystem.
Key Features
The Credential Handler API (CHAPI) is a W3C-specified browser API that enables websites to request and store Verifiable Credentials (VCs) without relying on centralized identity providers. It acts as a standard interface between relying parties (websites), issuers (credential sources), and wallets (user-controlled credential stores).
Wallet Independence
CHAPI decouples credential management from specific wallet applications. Users can choose any compatible digital wallet (e.g., browser extension, mobile app) that implements the API to store their credentials. This prevents vendor lock-in and promotes user sovereignty over their digital identity assets.
- Standard Interface: Wallets expose a common
credentialHandlerpolyfill. - User Choice: The browser prompts the user to select their preferred wallet when a site requests a credential.
Credential Request Flow
The core interaction where a relying party (RP) requests a specific credential from a user's wallet. The flow is initiated via navigator.credentials.get() with a Verifiable Presentation Request.
- Request: RP specifies the credential type (e.g.,
VerifiableCredential,UniversityDegreeCredential) and any required constraints. - User Mediation: The browser/wallet UI prompts the user to review and consent to sharing.
- Response: The wallet returns a Verifiable Presentation containing the requested credentials.
Credential Storage Flow
The process for an issuer (e.g., a university, government agency) to push a newly minted credential directly into a user's chosen wallet. This is initiated via navigator.credentials.store().
- Issuance: The issuer creates a signed Verifiable Credential.
- Direct Deposit: The credential is offered to the user's wallet via CHAPI, bypassing the need for downloads or manual imports.
- User Control: The user's wallet receives, validates, and stores the credential locally.
Decentralized Identifier (DID) Integration
CHAPI is designed to work seamlessly with Decentralized Identifiers (DIDs) and the W3C Verifiable Credentials Data Model. Credentials are typically bound to a user's DID, and presentations prove control of the corresponding private key.
- DID Resolution: Wallets may resolve DIDs to fetch public keys for verification.
- Cryptographic Proofs: Supports Linked Data Proofs (e.g., Ed25519Signature2020) and JSON Web Tokens (JWTs) as credential formats.
Use Cases & Examples
CHAPI enables user-centric identity patterns across the web:
- Login: Replace passwords with a credential proving membership or age.
- KYC/AML: Share a verified credential from a bank instead of resubmitting documents.
- Education: Store and present digital diplomas to employers or other institutions.
- Healthcare: Securely manage and present vaccination records or insurance details.
Real Implementation: The Digital Credentials Consortium universities use CHAPI for issuing and verifying academic credentials.
Ecosystem Usage & Implementations
The Credential Handler API (CHAPI) is a W3C standard browser API that enables websites to request and store Verifiable Credentials (VCs) directly from a user's digital wallet, creating a seamless, user-centric identity layer for the web.
Core Browser Integration
CHAPI provides the native browser plumbing that allows a website to call navigator.credentials.get() to request a credential and navigator.credentials.store() to store one. This bypasses the need for custom browser extensions or wallet-specific SDKs for basic interactions, standardizing how wallets and relying parties communicate.
User-Centric Wallet Mediator
When a site requests a credential, CHAPI acts as a mediator, presenting the user with a choice of compatible digital wallets (e.g., browser-based, mobile, or hardware) that can fulfill the request. This gives users control over their identity data and which wallet they use, preventing vendor lock-in.
Decentralized Identifier (DID) Authentication
A primary use case is DID-based authentication. Instead of a password, a relying party requests a Verifiable Presentation containing a credential issued to the user's Decentralized Identifier (DID). The user's wallet signs the presentation, proving control of the DID and enabling passwordless, phishing-resistant logins.
Verifiable Credential Issuance Flow
CHAPI streamlines the credential issuance process. After a user proves eligibility (e.g., completing a course), the issuer website can push a signed Verifiable Credential directly to the user's chosen wallet via credentials.store(). The user can then present this credential elsewhere, creating portable digital records.
Selective Disclosure & Data Minimization
Wallets using CHAPI can support selective disclosure. When a site requests proof of age, the wallet can generate a Verifiable Presentation that cryptographically proves the user is over 18 without revealing their birth date or other personal data, adhering to the principle of data minimization.
Credential Handler API (CHAPI)
A technical overview of the Credential Handler API, a W3C specification enabling browsers to manage digital credentials.
The Credential Handler API (CHAPI) is a W3C draft specification that provides a standardized browser interface for websites to request, store, and present verifiable credentials and other digital credentials, acting as a bridge between web applications and a user's local digital wallet. It defines a navigator.credentials polyfill that allows sites to call methods like get() and store() without needing to know the user's specific wallet implementation, thereby separating credential management from individual applications and enhancing user control over their identity data.
Architecturally, CHAPI introduces the concept of a credential handler, which is a web application (like a wallet) registered with the user's browser to manage credentials. When a relying party calls navigator.credentials.get(), the browser displays a picker interface showing the user's registered handlers. The selected handler then mediates the secure exchange, retrieving the requested credential from the user's wallet and presenting it to the verifier. This process enables user-centric identity, where individuals choose which wallet to use and explicitly consent to each data disclosure.
A core technical mechanism is the use of Web App Manifests and the credential_handler member for handler registration. The wallet declares its capability to handle specific credential types (e.g., VerifiablePresentation) in its manifest. When installed, the browser can invoke it as a separate, secure context. CHAPI is protocol-agnostic, meaning it can work with various underlying credential formats and data models, including W3C Verifiable Credentials, OpenBadges, and even traditional login credentials, making it a foundational layer for a decentralized identity ecosystem on the web.
Use Case Examples
The Credential Handler API (CHAPI) is a W3C standard that enables browsers and apps to securely request, store, and present digital credentials. These examples illustrate its practical applications for verifiable credentials (VCs).
University Diploma Verification
A graduate stores their university-issued verifiable diploma in a wallet. When applying for a job, the employer's portal uses CHAPI to request proof of the degree. The graduate selects the credential from their wallet, and the employer instantly verifies its cryptographic signature against the university's Decentralized Identifier (DID), eliminating manual checks.
Age Verification for Age-Restricted Content
A streaming service needs to confirm a user is over 18. Instead of collecting a copy of a driver's license, it uses CHAPI to request an age attestation credential from a trusted issuer (e.g., a government wallet). The user presents a zero-knowledge proof that confirms they are over 18 without revealing their exact birth date, protecting privacy.
Professional License & Certification
A healthcare professional holds verifiable credentials for their medical license and board certifications. A hospital's credentialing system uses CHAPI to request these credentials. The professional grants one-time access, and the system automatically verifies their standing with the issuing medical board, streamlining the onboarding process.
Selective Disclosure for KYC/AML
A financial institution requires Know Your Customer (KYC) checks. Instead of submitting a full identity document, a user employs CHAPI to present a credential from a trusted identity provider. Using cryptographic selective disclosure, they reveal only the necessary attributes (e.g., "is over 21" and "is a resident of Country X"), minimizing data exposure.
Cross-Platform Loyalty & Membership Cards
A retail chain issues verifiable membership credentials to customers. In-store kiosks, mobile apps, and e-commerce sites all use CHAPI as a standard interface to request proof of membership. The customer uses the same digital wallet to present their credential across all platforms, creating a seamless, portable loyalty experience.
CHAPI vs. Traditional Auth & Extension-Based Wallets
A technical comparison of credential management approaches for decentralized identity and digital wallets.
| Architectural Feature | Credential Handler API (CHAPI) | Browser Extension Wallets | Traditional Server-Based Auth |
|---|---|---|---|
User Agent Integration | Native browser API (W3C standard) | Browser add-on/plugin | None (relies on web app) |
Credential Storage Location | User's local wallet/agent (user-controlled) | Extension's isolated storage | Centralized server database |
Authentication Flow | Direct, user-agent mediated request/response | Injected provider, requires page interaction | Redirects to auth server (OAuth, OIDC) |
Cross-Origin Credential Access | |||
Permission & User Consent Model | Explicit, per-request user mediation | Persistent site permissions after initial grant | Session cookies or tokens after initial login |
Dependency on Third-Party Code | |||
Protocols Supported | W3C Verifiable Credentials, Decentralized Identifiers (DIDs) | Ethereum JSON-RPC, Solana Web3.js, etc. | OAuth 2.0, OpenID Connect, SAML 2.0 |
Primary Use Case | Portable, user-centric digital identity and verifiable data | Blockchain transaction signing and key management | Centralized user account login and access control |
Security & Privacy Considerations
The Credential Handler API (CHAPI) is a web browser API that enables websites to request and store digital credentials (like Verifiable Credentials) directly in a user's digital wallet, shifting control of identity data from centralized servers to the individual. This section details the key security and privacy mechanisms this architecture enables.
User-Centric Data Control
CHAPI implements a user-agent (wallet) mediated flow, preventing websites from directly accessing credential data without explicit user consent. This shifts the security model from server-side data silos to client-side data sovereignty. The user's wallet acts as a secure intermediary, ensuring credentials are only shared when the user intentionally approves a request, minimizing data leakage and unsanctioned tracking.
Selective Disclosure & Data Minimization
A core privacy feature enabled by wallets using CHAPI is selective disclosure. Instead of presenting an entire credential (e.g., a driver's license with full name, address, and ID number), the wallet can cryptographically prove only the required claim (e.g., "age > 21"). This minimizes the personal data exposed to verifiers, adhering to the principle of least privilege and reducing the impact of potential data breaches on the verifier's side.
Credential Provenance & Integrity
CHAPI is designed to handle Verifiable Credentials, which are cryptographically signed by the issuer. The wallet and verifier can independently verify the credential's authenticity (signature), integrity (that it hasn't been tampered with), and issuer status. This prevents the use of forged or revoked credentials, moving beyond insecure methods like screen-scraping PDFs or checking easily copied data.
Phishing & Spoofing Mitigation
The API defines a standardized credentialhandler origin, creating a trusted channel between the website and the wallet. This helps mitigate phishing attacks where a malicious site impersonates a legitimate credential request. The wallet's UI is rendered in a browser-controlled context, making it harder for a relying party to spoof the consent interface and trick users into releasing credentials.
Wallet Security Posture
The security of the overall system is contingent on the security of the user's credential wallet. This introduces considerations such as:
- Secure storage of private keys and credential data (e.g., using hardware security modules or secure enclaves).
- Wallet authentication (PIN, biometrics) to prevent unauthorized access.
- Auditability of consent logs and sharing history within the wallet. The wallet becomes a critical piece of the user's security infrastructure.
Privacy-Preserving Verifiable Presentations
When a wallet creates a Verifiable Presentation for a verifier, it can employ advanced cryptographic techniques to enhance privacy. These include:
- Zero-Knowledge Proofs (ZKPs) to prove statements about credentials without revealing the underlying data.
- Unlinkable presentations using techniques like blinded signatures or DID rotation to prevent verifiers from correlating multiple interactions back to the same user or wallet identifier.
Common Misconceptions
The Credential Handler API (CHAPI) is a W3C standard for managing digital credentials in web browsers, but its role in the blockchain and decentralized identity ecosystem is often misunderstood. This section clarifies its purpose, limitations, and relationship to key concepts like Verifiable Credentials and Decentralized Identifiers.
No, the Credential Handler API (CHAPI) is not a wallet itself; it is a browser-based interface that allows websites to communicate with external digital wallets. CHAPI provides a standardized way for a Relying Party (e.g., a website) to request a Verifiable Credential and for a user's wallet (the credential handler) to receive that request, store the credential, and later present it. Think of CHAPI as the 'USB port' that connects your computer (the website) to your external hard drive (your digital wallet); it defines the protocol for connection and data transfer but does not store anything itself. The actual credential storage, private key management, and user interface are handled by the separate wallet application that registers itself as a handler with the browser.
Frequently Asked Questions
The Credential Handler API (CHAPI) is a W3C standard browser API that enables web applications to request, store, and present digital credentials like Verifiable Credentials (VCs) and Decentralized Identifiers (DIDs). It acts as a bridge between websites and a user's digital wallet, providing a standardized user experience for credential interactions.
The Credential Handler API (CHAPI) is a W3C-specified browser API that provides a standardized interface for web applications to request, store, and present digital credentials, such as Verifiable Credentials (VCs). It works by allowing a website to call navigator.credentials.get() or navigator.credentials.store(), which triggers a user's registered credential handler (typically a digital wallet). This handler mediates the interaction, asking for user consent before sharing or storing credentials, thereby separating the relying party's website from the user's private credential storage. The API is polyfilled for browsers that do not yet have native support, ensuring broad compatibility for decentralized identity applications.
Further Reading
Explore the technical specifications, core components, and ecosystem tools that define the Credential Handler API (CHAPI) for decentralized identity.
Use Case: Sign In with Credentials
A primary application of CHAPI is replacing traditional username/password logins with passwordless authentication. A website (Relying Party) can request a Verifiable Presentation that proves the user controls a specific DID or holds a required credential.
- Flow: User clicks "Sign in with Wallet," the site calls
credentials.get(), the user's wallet pops up to consent and sign, and the site receives a verifiable proof. - Benefits: Eliminates phishing risks for passwords, reduces friction, and improves user privacy.
- Example Protocols: CHAPI is often used to implement Sign In with Ethereum (SIWE) or OpenID Connect for Verifiable Credentials (OIDC4VC).
Get In Touch
today.
Our experts will offer a free quote and a 30min call to discuss your project.