Skip to main content
DigiLocker is a government-backed platform that enables users to securely store and share official documents. By integrating DigiLocker with Cashfree, you can offer a consent-based KYC process that supports documents such as Aadhaar, PAN, and Driving License. This solution helps you comply with the latest UIDAI guidelines and the Digital Personal Data Protection (DPDP) Act. You can implement it using a simple API flow with minimal code changes.

Use cases

Use DigiLocker integration across industries to ensure compliance and streamline customer onboarding:
SectorUse case
Banking and NBFCsVerify Aadhaar and PAN during account opening and loan processing.
Micro-lending platformsConfirm user identity using Aadhaar and PAN before loan disbursement.
Insurance providersPerform identity verification during policy applications and claims.
Payments and fintech servicesValidate Aadhaar and PAN for user registration and wallet onboarding.
Trading and investment platformsComplete full KYC with Aadhaar and PAN verification for user onboarding.
E-commerce marketplacesVerify seller identities for compliance and fraud prevention.
Digital lending platformsAuthenticate borrowers with government-verified documents.

Why choose Cashfree

Cashfree’s DigiLocker integration provides these key advantages:
  • UIDAI and DPDP compliant: Fully legal and compliant for all merchants.
  • Consent-based verification: Users log in to DigiLocker and explicitly approve the sharing of their Aadhaar document.
  • User control and privacy: Aadhaar data isn’t exposed to merchants without user action. Data is retrieved securely via the government infrastructure.
  • Multiple document types supported: Retrieve Aadhaar, PAN, Driving License, and more.
  • Familiar and trusted interface: Users are redirected to the DigiLocker portal, increasing trust.
  • Streamlined integration: Simple API integration for document verification.

Verification process

You can verify documents through DigiLocker using two primary methods:
  • Merchant dashboard: Generate DigiLocker consent links for manual document verification
  • REST API: Integrate verification directly into your applications
Use the merchant dashboard for quick manual DigiLocker verification:
  1. Log in to the Merchant Dashboard.
  2. Navigate to Secure ID > Aadhaar/PAN > DigiLocker–Aadhaar.
  3. Select Verify Document and choose the verification type (Aadhaar, PAN, or Driving License).
  4. Select Verify Now to generate the DigiLocker link and share it with the customer.
Customer flow:
  1. Customer opens the DigiLocker link.
  2. Enters Aadhaar-linked mobile number and OTP for authentication.
  3. Reviews consent screen and approves document sharing.
  4. Cashfree retrieves verified document details from DigiLocker.
All verified documents appear in your dashboard with comprehensive details including document type, verification status, and customer information.
Use the DigiLocker Integration API for programmatic integration into your applications.

Understanding document types

DigiLocker supports verification of multiple government-issued documents through secure, consent-based authentication:
Primary Identity Documents:
Document TypeUse CaseKey Information Retrieved
AadhaarUniversal identity verificationName, DOB, address, Aadhaar number
PANTax identification and financial KYCName, PAN number, date of issue
Driving LicenseIdentity and address verificationName, license number, address, validity
Voter IDAge and address verificationName, voter ID, address, DOB
PassportInternational identity verificationName, passport number, validity

Best practices

Follow these recommendations to optimise your DigiLocker integration and ensure reliable document verification:
  • User experience: Provide clear instructions about the DigiLocker process to reduce abandonment rates and improve completion.
  • Link management: Monitor link expiry times and implement retry mechanisms for expired verification attempts.
  • Consent handling: Respect user consent decisions and provide alternative verification methods if DigiLocker consent is denied.
  • Data compliance: Implement proper data retention policies following DPDP Act guidelines for document verification records.
  • Error recovery: Build robust error handling for network issues, government service downtime, and authentication failures.
  • Security measures: Store API credentials securely and use HTTPS for all webhook endpoints and redirect URLs.
  • Status monitoring: Implement real-time status checking to provide users with verification progress updates.
  • Fallback options: Offer alternative verification methods when DigiLocker is unavailable or users can’t complete the flow.
  • Document validation: Cross-verify retrieved document data with your existing user information for additional security.
  • Performance optimisation: Cache verification results appropriately while respecting data privacy regulations.